[Cuis-dev] Language constructs

Luciano Notarfrancesco luchiano at gmail.com
Fri May 1 02:01:50 PDT 2020


Yes, curly brackets was certainly not the best choice in terms of notation,
but now I’m used to it. In my image I changed the printOn for some
Collections to be more concise and closer to mathematics.

On Fri, 1 May 2020 at 3:56 PM, Erik Stel <erik.stel at gmail.com> wrote:

> Hi Luciano,
>
> I agree, we can’t live (happily ;-) without Character, Symbol, Number and
> String literals. It would be very annoying to create instances without the
> existing literal declarations.
>
> I think we have the same feeling regarding {}, did not use it, but it
> makes code more readable in some places. Although I tended to use
> lazy initialised (class or instance) variables to create the instances I
> needed. I have the feeling it is more clear I am constructing an Array in
> that way. Since I do see code in which Arrays are constructed using {}
> which actually are more like Sets, namely to describe the set of
> possible/allowed values. It is then used to validate inclusion of an
> element within this …Array?! But the fact that an element has an index is
> not relevant. Maybe…just maybe…{} should have been used to create a Set
> instead of an Array. Seems more similar to the mathematical notation we
> used at school ;-).
>
> Thx for your insight!
> Erik
>
> On 1 May 2020, at 10:19, cuis-dev-request at lists.cuis.st wrote:
>
> I haven’t used backticks, because in the cases that I could have used them
> the performance gain was negligible, and I’m constantly refactoring and
> changing everything so I was afraid that they might introduce weird bugs
> (because old instances could linger inside compiled methods).
>
> Maybe I could live without #(), I don’t use it that much. I’m not sure it
> is important for the base system, tho. Same goes for $. However, symbol
> literals are important, and I can’t imagine coding without literals for
> numbers and strings, it is possible but must be very annoying.
>
> I like {} and use it often. It is relatively new, I used to code without
> it, and at the beginning I didn’t like it but ended up getting used to it.
> It does make code more readable.
>
> On Fri, 1 May 2020 at 2:46 PM, Erik Stel via Cuis-dev <
> cuis-dev at lists.cuis.st> wrote:
>
>> Maybe I wasn’t clear (because it was part of another topic, see below) or
>> tread on a sensitive subject, but I’m still eager to hear the reasoning for
>> having backticks (which are not in Squeak nor Pharo) from the simplicity
>> point of view. Would anyone care to elaborate?
>>
>> I am also eager to know what others think about language constructs such
>> as #(), {} and `` for daily usage. And I mean this in the sense ‘Do you use
>> these often? Could you live without them?’. I do understand how they can be
>> used and what their meaning is ;-). And I can also lookup their current use
>> in the default image, but that does not answer how you/we use them in our
>> (application) code.
>>
>> Kind regards,
>> Erik
>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20200501/b8fd415d/attachment-0001.htm>


More information about the Cuis-dev mailing list