Re: party cancelled
*sigh* again i hesitate to reply...but...
{jiri}
> but the only significant benefit of case sensitivity is that it allows
> you the lazy 'x' and 'X' as two distinct variables and set and Set and
> SET as separate routine names - a programming practice which is very
> difficult to recommend.
to be fair, before my 'real reply', and to emphasize this ever
so crucial point, i wholeheartedly agree.
an example that bit me quite viciously only recently:
whilst working on the truecolor library, just before my severely
fatal winBLOZE crapout, i decided to declare some constants for
color... simple enuff? Black={0,0,0} and Blue={150,0,0} and
Red={0,0,150} and Green={0,150,0} and etc etc etc (BGR by the way)
good so far right? well, when the mouse cursor decided to wrap
itself on the right edge of the screen to the left, i had to
enter that ever so fun 'fullblowndebugthisdamnthingmode' that
we have all done once or twice. lo! and behold! the library
included another file (graphics.e i think it was) that had
already!!! defined BLACK= WHITE= GREEN= etcetcetc...
ewwww nasty, bad bad thing, bad form!
this coulda reeked bloody havoc had I not caught it, from
some coder using this library, and trying to track down
BLACK versus Black...yuck!
onwards:
{jiri}
> It is just a modern trend in language design that also makes sense. If
> you have listened to my argument and can now accept that *explicit*
> types are completely redundant, then all we really need is a generic
> object,
ummmm.... perhaps???... maybe??? you didn't fully read 'the masters
letter'
as he says WHY!!! generic objects only as our choice are 'bad'.
{robert}
> >In the beginning (pre-1.0), all variables were declared as object.
> >There were no types.
> >About half way through coding language wars I found that
> >this hurt the readability of the code, because I started to forget
> >which variables normally contained sequences, and which
> >contained atoms. That's when I worked out Euphoria's strange
> >"type" mechansim. I created built-in types "sequence" and "atom",
> >and then I wanted a way for the user to add his own types.
Your suggestion to simply capitalize the first letter if it's
a constant (or whatever) really -wont- solve the problem
robert is referring to. Namely, readability!.... a very very crucial
concept, that goes byebye if you attempt 'naming conventions' that
aren't standardized in some fashion. What if joebob capitializes
the third letter if it's int, and the first if it's sequence whereas
bettyboob uses all cap except the second letter if its an atom...
see???? Without some amount of 'typing', even if it is 'fake' (such
as a strictly adhered to naming convention used by *all*),
readability (and even maintainability) just suffers horridly.
{jiri}
>I repeat: a variable can be implicitly, automatically
>declared by the very first assignment of a value to it. In other
>words, when you say x=20, for instance, the compiler checks the table
>of variables for 'x', and if it finds it, it just changes the value.
>If it does not, it simply creates a new object, an integer in this
>case, with an appropriate label.
I could agree that having the interpreter do that, automagically,
as it does for constants anyway, might just be a good thing.
It would be the next logical extension to the arguement that
inspired EU (datsa Euphoria :) ) by robert. That C++ (for ex)
was just overburdened with overtyping (pascal aint far behind)
and it spawned the need for a separate routine for *each* data type.
Counterpoint? Can you proffer a solution, implementing this suggestion,
that does not hurt readability, elegance, efficiency (after all, having
the interpreter do all that 'figuring' might slow it down...easy
enuff to get around too i suppose...), maintainability,
portability, and reliability?
{jiri}
> An uninitialized variable would still
> be flagged, so if you say y=x before 'x' is implicitly declared, you
> would still get the usual dose of compiler 'wisdom' that you seem to
> cherish so much.
this of course would be mandatory, in an 'object' only language.
to sum up: you seem concerned with readability, as marked by
your arguement for case insensitivity (which woulda flagged
my example real fast, and saved me and perhaps others a lotta
headaches), and this concern is good (IMO).
But, then... it seems to me that you almost revoke that
concern by taking away all 'typing' completely, and whilst
doing so, fail to offer an equitable solution to the
dilemma robert (and anyone else who has worked on a program
that is thousands of lines long) faced with readablity
and maintainability.
*shrug* that's just how i see it...
--take care all, and remember, if it wasn't for typos,
none of us would get any programming done at all, and
the term 'pre-alpha' would be meaningless (the horror!)
:)
*watches the ruffled feathers settle slowly, liltingly to
the computer printout riddled floor*
--g'night--Hawke'
all opinions expressed by my words are words that expressed my opinions.
|
Not Categorized, Please Help
|
|