liberty-eiffel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Liberty-eiffel Digest, Vol 53, Issue 9


From: Paolo Redaelli
Subject: Re: Liberty-eiffel Digest, Vol 53, Issue 9
Date: Sun, 20 Feb 2022 23:39:09 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1

Il 18/02/22 21:15, Raphael Mack ha scritto:
  For non-conforming inheritance I personally
prefer the "insert" syntax over "inherit {NONE}" but on the other side
it should not be a big deal to accept both in the parser.

Wise words. I always wondered if "inherit {NONE}" is non conforming inheritance, what's the meaning of "inherit {ANY}" or inherit "{SOME_OTHER_CLASS}" ?



ECMA brought quite some nice improvements which make the language more
modern, but clearly at a cost. While I extremely like the comfort of
dynamic type conversion I hate its side effect that we suddenly get two
objects of different classes for the same thing and even worse, that a
simple assignment suddenly could crash with an out-of-memory-exception.

Both are sound objections, but I fear that most developers would rather value "code clarity and conciseness" far more than correctness. I'm thinking about Javascript or Python developers.

In the deep-twin tutorial I'm writing I have:

 list := <<"First", "Second", "Third", &42>>
         ("Let's take some strings #(1) and duplicate it with `twin'%N" # &list).print_on(std_output)
         another := list.twin;

         ("[
         Another list items are actually the same of the original list:
         another@1 = list.item(1)? #(1)
         another@2 = list.item(2)? #(2)
         another@3 = list.item(3)? #(3)

         Note: a BOOLEAN is not directly printable, but we can obtain use & to get a lazy, printable representation          TODO: yes, I know people fond of other languages would have written another[1] = list[1]. We're working on it

         ]"
         # &(another@1 = list.item(1))
         # &(another@2 = list.item(2))
         # &(another@3 = list.item(3))).print_on(io)


But people coming from dynamic, loosely typed languages would prefer

list := <<"First", "Second", "Third", &42>> -- to be a LIST instead of an ARRAY ("Let's take some strings #(1) and duplicate it with `twin'%N" # list).print_on(std_output)

-- To avoid the & to turn "anything" into a LAZY_STRING

         another := list.twin;
         ("[
         Another list items are actually the same of the original list:
         another[1] = list[1]? #(1)
         another[2] = list[2]? #(2)
         another[3] = list[3]? #(3)

         Note: a BOOLEAN is not directly printable, but we can obtain use & to get a lazy, printable representation          TODO: yes, I know people fond of other languages would have written another[1] = list[1]. We're working on it

         ]"
         # another[1] = list[1]
         # another[2] = list[2]
         # another[3] = list[3]).print_on(io)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]