help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: plists, alists, and hashtables


From: Pascal J. Bourguignon
Subject: Re: plists, alists, and hashtables
Date: Wed, 05 Aug 2015 08:12:22 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Rusi <address@hidden> writes:

> However after perl and python (and awk) and... almost any language invented
> in the last 20 years, its rather backward.
> The efficiency is one thing
> The clumsy syntax is the bigger one (for me)

The clumsy syntax is on the part of perl and python and awk and so on.

What you are losing from sight is the fact that:

- a-lists are lists
- p-lists are lists
- lists are sequences
- lists are cons cells or nil

therefore any operator working on cons cells, on sequences, on lists,
can also work on p-lists and on a-lists.

Therefore you don't need any specific syntax to work with a-lists,
because they are just normal lisp symbolic expressions, and you can use
the whole of lisp to process them however you want.  You are not
restricted to a sterotyped straighjacket syntax to process exclusively
dictionaries, maps or whatever they have in those lesser languages.

Ignoring unicode, because no human can identify every glyphs of the
billions you could compose in unicode and reproduce them without
hesitation, and removing the characters already used for some lisp
syntax '"#():`,@;.\?[]  and those that are normal constituents and used
in existing symbol names &+-*/%<=>, that leaves only 8 characters for
new syntaxes !$^_{|}~

Unfortunately there are many more than 8 datastructures for which you
could want a specific syntax. 

Therefore your requirement is impossible.  There's no reason to
allocate, eg. {} to some kind of maps over some other that I could
prefer for my programs.


On the other hand, if emacs lisp had readtables and reader macros like
Common Lisp (or improved, like named readtables), we could introduce
local syntaxes for specific packages.  You could even make use of some
specific unicode characters that you can type non-clumsily on your
keyboard (but only YOU could do that, since other people would have
other keyboard layout and it would be anything from very clumsy (C-x 8
RET what's this fucking character name again? RET) to impossible to
type.  So thanks for that non-clumsy syntax of yours.  

Give me sexps anytime!

-- 
__Pascal Bourguignon__                 http://www.informatimago.com/
“The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.” -- Carl Bass CEO Autodesk


reply via email to

[Prev in Thread] Current Thread [Next in Thread]