Partial Expression proposal

Isiah Meadows isiahmeadows at gmail.com
Thu Dec 28 15:19:54 UTC 2017


Except it's not. The identifier `foo\u0048` is equivalent to `fooA`,
for example.
-----

Isiah Meadows
me at isiahmeadows.com

Looking for web consulting? Or a new website?
Send me an email and we can get started.
www.isiahmeadows.com


On Thu, Dec 28, 2017 at 6:56 AM, Tamás Halasi <trusted.tomato at gmail.com> wrote:
> Do you think \ would be a good replacement for #?
> It is currently illegal outside string literals as far as I know.
>
> 2017-12-28 1:23 GMT+01:00 Alexander Jones <alex at weej.com>:
>>
>> The real JavaScript 'character wall'.
>>
>> On 27 December 2017 at 21:30, Sebastian Cholewa
>> <sebastian.cholewa at interia.eu> wrote:
>>>
>>> On PC writing “§” character wouldn’t be convenient, as it’s not on
>>> keyboard. One would has to copy and paste it. I see this as problematic.
>>> Writing code should not require any extra acrobatics with set of characters.
>>>
>>> To be more constructive, available characters are:
>>> !@#$%^&*()_+-=[]{};:'",<.>/?
>>>
>>> W dniu .12.2017 o 21:56 Tamás Halasi <trusted.tomato at gmail.com> pisze:
>>>
>>>
>>>> Hmm I see. I'll definitely remove the multiple ? marks and keep it one
>>>> level.
>>>> And change the # to something else... For example, §.
>>>> With these changes, is there anything which should be changed?
>>>>
>>>> 2017-12-27 21:17 GMT+01:00 Isiah Meadows <isiahmeadows at gmail.com>:
>>>>
>>>>> My concern: I get the concept, and could see how at the first level
>>>>> (e.g. `#? + ?`) it could be useful, but I can tell you that this
>>>>> doesn't look especially obvious, and starts to look almost like the
>>>>> line noise of some Perl or APL [1]/J [2]/etc.:
>>>>>
>>>>> ```
>>>>> // Example 1:
>>>>> let foo = #foo(#???:??)
>>>>>
>>>>> // Example 2:
>>>>> let constant = ##??
>>>>>
>>>>> // Example 3:
>>>>> let makeAdder = ##?+??
>>>>> ```
>>>>>
>>>>> And I agree with Mike in that it does remind me of De Bruijn indices.
>>>>> Those are nice in binary encodings, but they tend to start looking
>>>>> like line noise after sufficient depth. (An entire esoteric language
>>>>> has been formed based on this whole thing: Binary Lambda Calculus
>>>>> [3].)
>>>>>
>>>>> Oh, and this will most *certainly* conflict with the stage 3 private
>>>>> property proposal:
>>>>>
>>>>> ```js
>>>>> let bar = () => console.log("outer")
>>>>> class Foo {
>>>>>     #bar = () => console.log("inner")
>>>>>
>>>>>     method() {
>>>>>         // Should this return a thunk or log "inner"?
>>>>>         list.map(##bar(1, 2, ?))
>>>>>     }
>>>>> }
>>>>> ```
>>>>>
>>>>> [1]: https://en.wikipedia.org/wiki/APL_(programming_language)
>>>>> [2]: https://en.wikipedia.org/wiki/J_(programming_language)
>>>>> [3]: http://web.archive.org/web/20161019165606/https://en.
>>>>> wikipedia.org/wiki/Binary_lambda_calculus
>>>>>
>>>>> -----
>>>>>
>>>>> Isiah Meadows
>>>>> me at isiahmeadows.com
>>>>>
>>>>> Looking for web consulting? Or a new website?
>>>>> Send me an email and we can get started.
>>>>> www.isiahmeadows.com
>>>>>
>>>>>
>>>>> On Wed, Dec 27, 2017 at 2:55 PM, Tamás Halasi
>>>>> <trusted.tomato at gmail.com>
>>>>> wrote:
>>>>> >> This sentence ends abruptly.  What would this proposal improve?
>>>>> >
>>>>> > Oops, I accidentally pressed Send...
>>>>> > So, it would improve functional programming in general, the examples
>>>>> > are
>>>>> in
>>>>> > the README.
>>>>> >
>>>>> >> Is this lambdas with De Bruijn indices?
>>>>> >
>>>>> > Hmm, I haven't heard of them yet, but by looking at the surface, they
>>>>> seems
>>>>> > to be similar.
>>>>> >
>>>>> >> You have ?? and ??? for referring to outer layers.  Is there no
>>>>> ambiguity
>>>>> >> there?
>>>>> >
>>>>> > That's a very good point! I haven't thought of that. I can't think of
>>>>> > a
>>>>> > solution, the lookahead is indeed very bad. I opened an issue. I
>>>>> > think
>>>>> the
>>>>> > notation (for accessing arguments from outer layers) will have to be
>>>>> changed
>>>>> > / removed.
>>>>> >
>>>>> > Thanks for the feedback! :)
>>>>> >
>>>>> > _______________________________________________
>>>>> > es-discuss mailing list
>>>>> > es-discuss at mozilla.org
>>>>> > https://mail.mozilla.org/listinfo/es-discuss
>>>>> >
>>>
>>> _______________________________________________
>>> es-discuss mailing list
>>> es-discuss at mozilla.org
>>> https://mail.mozilla.org/listinfo/es-discuss
>>
>>
>


More information about the es-discuss mailing list