realbasic-nug
[Top] [All Lists]

Re: "You're not going to learn how to program in BASIC any more"

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: "You're not going to learn how to program in BASIC any more"
From: Alex Lindsay <alindsay at mac dot com>
Date: Fri, 30 Sep 2005 20:53:41 -0500
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <20050930142614 dot C65A0DDD465 at lists dot realsoftware dot com> <433D5E28 dot 1090302 at wanadoo dot fr> <70af859d6b5bbb44e39f618e4646a05a at mac dot com> <D12CC48E-26B5-454F-9882-482ECC9BF037 at haranbanjo dot com> <76d2aeb6e418df81da555049b0f028dc at mac dot com> <F5E9AED0-C024-4F82-B359-45EE0044578E at haranbanjo dot com> <5A568C34-A45C-4172-880F-DF6EF073A11D at componentx dot com>
Well my point is not that in C++ they aren't the same (they are) but that logically they should NOT be the same. If I am passing the address of an integer variable it SHOULD be different than passing an array of integers. This would allow the compiler to be more strict and find more errors, etc. There is a lot of published work on this on topic and on the topic of theoretical OO languages. C++ was the first OO language that let me write real PC languages and was my second OO language after Small Talk. I have used Object C, Object Pascal, Java, Eiffel, Modula II among OO languages. I have also dealt with a large amount of C, Pascal, ASM, etc. Anyway, back on topic, I am a firm believer that when the language is strongly type, statically linked and with a more "rigid" syntax, it simply works better for large scale, group oriented projects.

Now, while I know I am coming on strong with my opinions, I fully realize it is only my opinion, and certainly do not get offended if any disagrees with my position. After all, more intellectual transfer occur between people with different opinions than from people in the same ideological camps!

I hope that everyone has enjoyed the conversation and discussion as much as I have, and that i haven't permanently offended anyone! :)

Thank you,

Alex Lindsay


On Sep 30, 2005, at 1:22 PM, Brad Hutchings wrote:

Array notation is nothing but syntactic sugar. It's a base address + an offset into a block of uniformly sized memory blocks. Nothing in the language absolves you of the responsibility to stay in the bounds of what the compiler allocates for the array on the stack, or you explicitly allocate in the heap.

My bet is that Will was a CS major. This is the kind of trivia that makes a good quiz question in a lower division "programming" class. But, as we now have operating systems that keep programmer mistakes with this stuff from hurting the whole system, having a real understanding of what's going on is probably a waste of most developer's time.

-Brad

On Sep 30, 2005, at 10:37 AM, Will Leshner wrote:

Ok, again this is for the benefit of our listeners, but (and this is more a general C thing than anything specific to C++) pointers and arrays are really just two ways to say the same thing in C. In fact, I'd go so far as to say that array notation is just syntactic sugar for pointers. I would expect that most compilers would generate the same code for both.


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>