On Sat, Dec 22, 2018 at 8:05 PM Viktor Kojouharov <vkojouha...@gmail.com>
wrote:

> Curiously, Java 12 will also support switch expressions, and java is about
> as non-expressive as it gets.
>

What makes you say that? Java is as much of an expression language as C. In
particular, assignments are expressions, which I think is pretty much
uncontested to being a mistake. So Java making making a change like that
shouldn't count as a particularly strong argument in their favor (though
I'm also not saying it should count as an argument against).


>
> On Wednesday, December 19, 2018 at 11:39:32 PM UTC+2, Tyler Compton wrote:
>>
>> There is some precedent. Python has an if expression of sorts that is
>> distinct from its if statements:
>>
>> print(value1 if condition else value2)
>>
>> And in all Lisp dialects I'm familiar with, if is an expression:
>>
>> (print (if condition value1 value2))
>>
>> Not to say that this means Go should support it necessarily.
>>
>> On Wed, Dec 19, 2018 at 12:16 PM Jan Mercl <0xj...@gmail.com> wrote:
>>
>>> On Wed, Dec 19, 2018 at 9:09 PM Viktor Kojouharov <vkojo...@gmail.com>
>>> wrote:
>>>
>>>
>>> > I'm interested to know whether it was considered (I can't imagine that
>>> it wasn't) for if and switch statements to be expressions instead
>>>
>>> I can't imagine it was considered. Is there a precedence in other
>>> language? Not even C supports that.
>>>
>>>
>>> --
>>>
>>> -j
>>>
>>> --
>>> 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...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> 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.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to