Posted by Tony Marston on 07/30/06 08:42
"Richard Levasseur" <richardlev@gmail.com> wrote in message
news:1154194337.110008.261960@p79g2000cwp.googlegroups.com...
>
> ImOk wrote:
>> Richard Levasseur wrote:
>> > ImOk wrote:
>> > > Smalltalk is the only language I know that was designed around case
>> > > sensitivity being used correctly and with a purpose. If you study
>> > > their
>> > > system (and it's not complicated) you can write better code in all
>> > > the
>> > > other languages.
>> > >
>> >
>> > I'm not familar with Small talk (though i always hear great things
>> > about it), but how does the case of identifiers affect things?
>>
>> It's 'Smalltalk' one word and lower case t :)
>>
>> The idea is that if you write the code in proper English you achieve a
>> couple of things:
>>
>> 1) The only necessary comments are the description at the top of a
>> method. Your English is self documenting the code.
>>
>> 2) Very short methods. If a method is longer than 1/2 of a screen this
>> means you cannot visually see your logicall without jumping up and
>> down. The language doesnt even have a case statement and the
>> ifTrue:ifFalse: is actually a method similar to inline ifs we have in
>> PHP.
>>
>> 3) You can write what could take you 5 lines of code on one line. You
>> just read left to right including the math (there is no operator
>> precedence).
>>
>> So it was necessary to have standards including case sensitivity to
>> make the coding concise.
>
> Not sure if that answers my question.
>
>>From your original post i got the impression that, depending on the
> case of identifiers, Smalltalk would enforce that convention.
> ie:
> MYCONST => a global or constant value
> MyClass => required to be a class declaration
> myIdentifier => required to be a variable or method
>
> Which could potentially be a nice feature in a language. Or it could
> be really annoying.
Annoying is right. The problems that this could potentially cause seriously
outweighs any benefits (what benefits?)
--
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
Navigation:
[Reply to this message]
|