DevHeads.net

How do you feel about utf-8 in ruby code?

Is this acceptable?

'a⟶b'.to_sym == :a⟶b

Granted, this is a simplistic example, but how do you feel about using
utf-8 in the ruby code itself?

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Comments

Re: How do you feel about utf-8 in ruby code?

By Walter Lee Davis at 03/14/2019 - 16:45

I will sometimes use non-ascii characters in comments, but never in a method name or signature. It’s an ergonomic thing—I just don’t want to have to type a combo keystroke that often.

Walter

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Re: How do you feel about utf-8 in ruby code?

By RRRoy BBBean at 03/14/2019 - 16:47

Objection noted: Ergonomics. Thank you :-)

On 3/14/19 3:45 PM, Walter Lee Davis wrote:
Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Re: How do you feel about utf-8 in ruby code?

By Peter Hickman at 03/14/2019 - 16:59

As on observation on other languages that try to show off unicode in the
source:

1) I probably don't know how to type whatever weird symbol you used so I
will be forever have to cut a paste to edit your code
2) I, personally, know that *