[Newbies] Left-arrow for assignment
bert at freudenbergs.de
Tue Jul 15 17:55:59 UTC 2008
Am 14.07.2008 um 16:54 schrieb Dominic Espinosa:
> On Tue, Jul 15, 2008 at 11:40:58AM +1200, Michael van der Gulik wrote:
>> On Mon, 14 Jul 2008 01:20:25 -0400
>> Dominic Espinosa <dcespin at fastmail.fm> wrote:
>>> I've experimented with Squeak a bit, and have also seen the debate
>>> the assignment symbols and how to handle the left-arrow, ':=', and
>>> underscore at http://wiki.squeak.org/squeak/5751. However, I want
>>> to use
>>> the left-arrow in my code. Is this possible? It seems like
>>> from ':=' to left-arrow and vice-versa should be straightforward
>>> (indeed, a sed script could do it).
>> I think that most people agree that the := should be used instead
>> of a left arrow in code.
> I can understand a certain preference for ':=' over left-arrow, but
> is 2008. = ) I don't know why we should stick with ASCII all the time.
> Haskell, for instance, would look a lot nicer with arrow glyphs,
> and a few other symbols. Since ':=' and left-arrow both just mean
> 'assign' in this circumstance, why not let it be displayed as one or
> the other according to preference?
>> To use the left arrow, get a fine-tipped permanent marker and very
>> carefully draw an arrow head on the '_' key on your keyboard. Then,
>> you can use this key for when you want a left arrow in your code. You
>> may need to choose a font that has a left arrow in it as well.
>> If you want to get fancy (and I encourage you to do so for
>> sake :-) ), you could try mapping the underscore key to output a left
>> arrow character (←, Unicode 0x2190) using whatever your operating
>> system provides, and then modify the Squeak compiler to use that for
> Indeed, using '_' for assignment seems repugnant to a lot of people.
> Some of the debate in the previous swiki link focused on this aspect,
> and the issues in having '_' have such a non-standard meaning in
> as well as the need to use '_' in circumstances other than assignment.
> Maybe left-arrow could be internally represented as
> ':=', filed-out as ':=', etc, but displayed as left-arrow according to
> preferences. Additionally, a key-binding could be used for inserting
> left-arrow while typing.
> I'm not sure what kinds of issues this would raise in how source
> code is
> represented; I recall someone saying that the representation would
> to change significantly for this to work. But perhaps there's an easy
> way to do it?
If you use Shout this is exactly how it is working.
- Bert -
More information about the Beginners