[Haskell-cafe] Some thoughts on Type-Directed Name Resolution
wren ng thornton
wren at freegeek.org
Tue Feb 7 23:28:54 CET 2012
On 2/7/12 4:52 PM, Richard O'Keefe wrote:
> Anyone who has had occasion to write Fortran in the last 20+ years
> has had to discover just how quickly you can get used to using
> 'record%field'. I'm not really a COBOL programmer, but Prolog and
> Erlang and Smalltalk taught me well that '.' in a programming language
> can perfectly well mean exactly what it means in English: end of
> statement. I just do not buy the idea that the connection between
> dot and field access is anything more than a habit of mind engendered
> by a few languages or that it should be respected any more than the
> habit of using a(i) -- Fortran, Simula 67, Ada, Dijkstra's notation,
> PL/I -- or a[i] -- Algol 60, Algol 68, Pascal, C and its horde of
> delirious imitators -- for array access.
Hear hear!
I'd be perfectly fine with %field (alas the Ratio type), or #field (alas
-XMagicHash), or @field (alas confusion in Core for type application),
or any other number of options--- but the .field choice is far too
fraught with issues and the connotations it brings up are not at all
convincing to me. It's not like we use angle brackets for passing
arguments to type constructors, nor parentheses to pass arguments to
functions, nor any of the conventional notations for array access, nor...
--
Live well,
~wren
More information about the Haskell-Cafe
mailing list