But Scala doesn’t use [] for anything else - Go does. 

> On Jul 15, 2020, at 9:58 AM, 'Nic Long' via golang-nuts 
> <golang-nuts@googlegroups.com> wrote:
> 
> Square brackets work great. Scala uses them for generics to great effect. 
> They also make me think of Clojure, which introduced them to Lisp for similar 
> reasons to here - to avoid too much overload of regular parentheses - and 
> which people have been very happy with.
> 
>> On Wednesday, 15 July 2020 at 08:37:15 UTC+1 ba...@iitbombay.org wrote:
>> As I wrote, parentheses are not needed for the common case of single type 
>> parameter. If you have more than one, you need parentheses but note that 
>> this 
>> is a *prefix* and any parsing ambiguities can removed by using a - if 
>> needed. 
>> For your example it will be something like 
>> 
>> (float64,int)PowN(1.2, 3) 
>> 
>> It’s just a syntax change. There is zero semantic difference from the 
>> current 
>> proposal. I just tried to get idea across - I can work out a complete set of 
>> syntax rule changes if there is sufficient interest but the gen rule will be 
>> something like 
>> 
>> gen-type-decl: gen-prefix type-decl; 
>> gen-func-decl: gen-prefix func-decl; 
>> gen-prefix: “gen” typeX-list 
>> typeX-list: typeX | typeX-list “,” typeX ; 
>> typeX: NAME [constraint] ; 
>> 
>> > On Jul 15, 2020, at 12:01 AM, 'Dan Kortschak' via golang-nuts 
>> > <golan...@googlegroups.com> wrote: 
>> > 
>> > How do these deal with non-type determined uses. Say you have (by any 
>> > spelling) 
>> > 
>> > gen F,I func PowN(a F, b I) F {...} 
>> > 
>> > How do you specify the type of F or I when say you have untyped 
>> > constants. This still requires parens or other markings to indicate the 
>> > actual types of F and I. It seems many of the comments here complaining 
>> > about brackets and such are ignoring this aspect of the current 
>> > proposal. 
> 
> This e-mail and all attachments are confidential and may also be privileged. 
> If you are not the named recipient, please notify the sender and delete the 
> e-mail and all attachments immediately. Do not disclose the contents to 
> another person. You may not use the information for any purpose, or store, or 
> copy, it in any way.  Guardian News & Media Limited is not liable for any 
> computer viruses or other material transmitted with or as part of this 
> e-mail. You should employ virus checking software.
>  
> Guardian News & Media Limited is a member of Guardian Media Group plc. 
> Registered Office: PO Box 68164, Kings Place, 90 York Way, London, N1P 2AP.  
> Registered in England Number 908396
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/9ac6d86f-7647-4814-b15f-67f5cec5dadcn%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/FBC26216-66EC-4EE8-8721-A907729FBB81%40ix.netcom.com.

Reply via email to