| Author |
Message |
|
| Guest |
Posted: Wed Mar 12, 2008 4:58 am |
|
|
|
Guest
|
On 12 Mar 2008, at 1:58 pm, Robert Virding wrote:
> Very few of the misfeatures of Erlang syntax are new, though this
> doesn't make them less important. Some are be fixable.
>
> I was probably a little unclear but I was interested in the question
> of a whole new syntax, which at least Ulf understood. And the follow-
> up question of whether this would satisfy people?
It seems to me that a new syntax for Erlang should do one of three
things,
and ideally should do them all.
(1) Reduce the labour of creating Erlang.
I have a proposal for 'HaskErl' -- a Haskell-inspired syntax for
Erlang,
which has not kept up with developments in the bit syntax. I
found that
this can reduce the SLOC count by a factor of 1.6. That is, for
every
8 lines of Erlang, there would be 5 lines of HaskErl.
In code which is heavily commented, of course, the total effect
would be
much reduced, because the comments would not change.
(2) Reduce the error rate when creating Erlang.
That is, it should lead you into making fewer mistakes. One can
have ideas
about what _ought_ to be error prone, but really, empirical
measurement is
called for. HaskErl requires explicit 'let' for binding
identifiers (or
equally explicit comprehensions), reducing some errors, but the
great
reduction in parentheses and commas presumably increases others.
(3) Reduce the labout of editing Erlang.
This, of course, invites (NOT "begs") the question "by what
editor?"
Arguably, Lisp is about as good as it gets here, and LFE is a very
worthwhile experiment.
I don't list "familiarity" as a criterion, for two reasons.
- The kind of programmer who is likely to be interested in Erlang is
likely
to already be familiar with at least one language that didn't steal
its
syntax from C.
- Too much similarity can lead to mistakes when things aren't
_exactly_ the
same. When I was taught French at school, I was warned about "faux
amis":
words that looked exactly like English words, but didn't mean the
same.
> I suppose the question really gets back to where the *real* problem
> is. Is it really the syntax, or is it actually the semantics but
> people see it a syntax problem because that is what they see first,
> the syntax? If a new syntax really solved new users problems then it
> might be worth doing, otherwise not. What do people think?
Does anyone remember a story by John Brunner about "stardroppers"? It
appeared
as a serial in Analog, but was also published as a book. The hero was a
government agent. One of the nice little gimmicks in the book was
that he
communicated with his superiors in a unique language specially
designed for
him, based on his person and personality. When he reported to them,
he never
knew what he said, but it felt really really comfortable saying it.
My point is that syntax isn't *the* problem, but it is *a* problem in
the sense
that practically everyone has a language in them, and Erlang isn't it,
and the
mismatch will be a source of discomfort.
Does anyone remember the wave of PL/I-like languages?
Or the wave of Algol 68-inspired languages?
Or the later wave of Pascal-like languages?
Heck, I've even seen a language that borrowed the control structures
of SNOBOL!
PL/I is pretty much gone; Pascal is pretty much gone; SNOBOL is gone;
but Lisp is still with us.
Oh yeah, so are Fortran, Basic, and COBOL. Should we make Erlang look
like COBOL?
If Erlang got a Java-inspired syntax, we'd still get grief from people
who wanted it to look like C# instead.
_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions
Post recived from mailinglist |
|
|
| Back to top |
|
| warezio |
Posted: Wed Mar 12, 2008 5:13 am |
|
|
|
User
Joined: 05 May 2007
Posts: 107
Location: Yahoo
|
Re: syntax vs. semantics, from someone who recently learned the language.
I got the semantics. It's why I pushed through the warts in the syntax;
and coming from Haskell, there were alot of things that were not as nice.
Most of them have already been mentioned, no need to rehash.
Now I'm used to it, and in 3 months our little startup has a cloud
computing infrastructure that I only dreamed about at my large company
job, and we never go down thanks to hot code deployment. So Erlang does
not suck. However I hope it does not rest on its laurels either. Good
syntax makes life more pleasant.
-- p
On Wed, 12 Mar 2008, Robert Virding wrote:
> Very few of the misfeatures of Erlang syntax are new, though this doesn't
> make them less important. Some are be fixable.
>
> I was probably a little unclear but I was interested in the question of a
> whole new syntax, which at least Ulf understood. And the follow-up question
> of whether this would satisfy people?
>
> For example assume we did a new flavour of Erlang based on Java which had
> the look of Java but still had Erlang semantics (it couldn't be otherwise).
> Would this make new users who came from more traditional languages happy? Or
> would it just make it worse in that it might look the same as what they are
> used to (sort of) but there would still be no "real" assignments or
> destructive operations or loops etc ?
>
> I suppose the question really gets back to where the *real* problem is. Is
> it really the syntax, or is it actually the semantics but people see it a
> syntax problem because that is what they see first, the syntax? If a new
> syntax really solved new users problems then it might be worth doing,
> otherwise not. What do people think?
>
> One benefit on basing a new syntax on a typed language would be that adding
> (optional) type declarations would still look "right". Typing records just
> looks weird to me.
>
> Robert
>
Optimism is an essential ingredient of innovation. How else can the
individual favor change over security?
-- Robert Noyce
_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions
Post recived from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Wed Mar 12, 2008 8:34 am |
|
|
|
Guest
|
Robert Virding wrote:
> On 11/03/2008, *Mats Cronqvist* <mats.cronqvist@kreditor.se
> <mailto:mats.cronqvist@kreditor.se>> wrote:
>
> Jim McCoy wrote:
> > ... Regardless of what records were
> > intended to solve...
> >
> i believe that the original requirement was something like;
> "access to
> tuple elements by name, but with zero overhead compared to normal
> tuple
> access."
> a pretty tall order (and, with hindsight, misguided)...
>
>
> Yes, this was one of the original requirements of our first/major
> users. They wanted named fields but as fast as using tuples directly.
> The system (computer+emulator) wasn't as fast in those days and they
> felt they couldn't offer performance. It was not misguided then.
> Anyway this meant that everything had to be done at compile-time,
> which *is* very un-Erlangy.
(with hindsight) i think it's obvious that a few percentage points of
performance was not worth the drawbacks of records.
mats
Post recived from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Wed Mar 12, 2008 10:21 am |
|
|
|
Guest
|
Funny... Having only written smallish programs in both Haskell and
Erlang, and having read through some library and example code from
each, I've gotta say most of the Erlang code I've seen has been easier
to understand than the most of the Haskell code I've seen, so my own
impression is that Erlang syntax is nicer than Haskell syntax. It's
partly cultural, of course -- I see a lot more single-letter variable
names in Haskell, which maybe is an academic thing -- but syntax
features like the ability to jam random punctuation together and call
it an operator doesn't help.
As for semantics, the computer scientist in me really really likes the
purity and laziness in Haskell, and Erlang's non-pure semantics turned
me off for a while; but when I realized that Erlang does at least keep
all values immutable, the beautiful concurrency model tipped the
scales for me to start checking it out... The one last semantic thing
that bugged me in Erlang turned out to be a misconception: Seeing
references to functions like io:format made me think they were direct
I/O calls, which was disappointing because I hoped that all
side-effects would be done through message passing (to satisfy my
craving for some kind of "purity"). But recently I took a look at the
source code for the io module, and lo-and-behold, it's message
passing! Yay.
Okay, anyway, there's another newbie datapoint for y'all.
(Almost all my professional work has been in Java, and now a project
in PHP, which is sad, because my concentrations in college were
programming languages, compiler design, and the theory of
computation... I like Java better than any of the other "mainstream"
languages because at least it has a defined concurrency semantics,
even if it's too low-level; so I've been able to amuse myself with
building higher-level concurrency abstractions, including working on
Prevayler... And prodding people over and over on project after
project to please please properly synchronize all access to shared
state, because you really don't know what's going to happen when that
race condition pops up when you're not looking so it's really not
worth the perceived performance benefit you think you're going to get
because "sychronization is slow" etc., etc., ...)
Cheers,
Justin
On Tue, Mar 11, 2008 at 10:07 PM, Paul Mineiro
<paul-trapexit@mineiro.com> wrote:
> Re: syntax vs. semantics, from someone who recently learned the language.
>
> I got the semantics. It's why I pushed through the warts in the syntax;
> and coming from Haskell, there were alot of things that were not as nice.
> Most of them have already been mentioned, no need to rehash.
>
> Now I'm used to it, and in 3 months our little startup has a cloud
> computing infrastructure that I only dreamed about at my large company
> job, and we never go down thanks to hot code deployment. So Erlang does
> not suck. However I hope it does not rest on its laurels either. Good
> syntax makes life more pleasant.
>
> -- p
_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions
Post recived from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Wed Mar 12, 2008 11:39 am |
|
|
|
Guest
|
If I really wanted a whole new Java like syntax with Erlang like
semantics I would be coding/promoting/improving Scala.
All I am looking for is consistency within Erlang's constructs. The
rest I can deal with.
Regards,
t
2008/3/11 Robert Virding <rvirding@gmail.com>:
> Very few of the misfeatures of Erlang syntax are new, though this doesn't
> make them less important. Some are be fixable.
>
> I was probably a little unclear but I was interested in the question of a
> whole new syntax, which at least Ulf understood. And the follow-up question
> of whether this would satisfy people?
>
> For example assume we did a new flavour of Erlang based on Java which had
> the look of Java but still had Erlang semantics (it couldn't be otherwise).
> Would this make new users who came from more traditional languages happy? Or
> would it just make it worse in that it might look the same as what they are
> used to (sort of) but there would still be no "real" assignments or
> destructive operations or loops etc ?
>
> I suppose the question really gets back to where the *real* problem is. Is
> it really the syntax, or is it actually the semantics but people see it a
> syntax problem because that is what they see first, the syntax? If a new
> syntax really solved new users problems then it might be worth doing,
> otherwise not. What do people think?
>
> One benefit on basing a new syntax on a typed language would be that adding
> (optional) type declarations would still look "right". Typing records just
> looks weird to me.
>
> Robert
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@erlang.org
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions
Post recived from mailinglist |
|
|
| Back to top |
|
| Thomas Lindgren |
Posted: Wed Mar 12, 2008 11:59 am |
|
|
|
User
Joined: 09 Mar 2005
Posts: 284
|
--- "Richard A. O'Keefe" <ok@cs.otago.ac.nz> wrote:
> On 12 Mar 2008, at 12:05 am, Christian S wrote:
> > Would it be possible to create a pattern matching
> syntax for some kind
> > of association map?
>
> Yes it would. Joe Armstrong and I have both
> produced such designs.
> I don't know how he intends his to be implemented,
> but mine manages
> to be sufficiently memory-efficient in the usual
> case to completely
> replace existing uses of records, while still being
> flexible. It is
> *definitely* EEP time.
I think this is a fairly good time for
hashes/dicts/structs/association maps/... (Though if
it's this or unicode, I'd choose unicode.)
Anyway, I'd want these terms to have Richard's
semantics and Joe's syntax. (half
Best,
Thomas
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions
Post recived from mailinglist |
|
|
| Back to top |
|
| Thomas Lindgren |
Posted: Wed Mar 12, 2008 12:07 pm |
|
|
|
User
Joined: 09 Mar 2005
Posts: 284
|
--- Robert Virding <rvirding@gmail.com> wrote:
> Yes, this was one of the original requirements of
> our first/major users.
> They wanted named fields but as fast as using tuples
> directly. The system
> (computer+emulator) wasn't as fast in those days and
> they felt they couldn't
> offer performance. It was not misguided then. Anyway
> this meant that
> everything had to be done at compile-time, which
> *is* very un-Erlangy.
The problem is really that, coupled with the backward
compatibility commitment, all those quick fixes then
can never ever be revised.
(Well ... hardly ever
Anyway. Not pretty, but perhaps not a huge issue --
platforms such as Java and Unix live with the same, or
worse.
Best,
Thomas
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions
Post recived from mailinglist |
|
|
| Back to top |
|
| wuji |
Posted: Mon Sep 17, 2012 7:02 am |
|
|
|
User
Joined: 10 Aug 2012
Posts: 654
|
Romney's "first day" timeframe.Now, repeal has re-emerged as a top top cheap replica *beep* top campaign issue for congressional Republicans, much like the 2010
elections that swept Rep John. Boehner into the speaker's chair."It chair."It [h2]cheap polo ralph lauren[/h2] chair."It becomes a huge issue going forward to the election
November," Rep. Steve King, R-Iowa, told ABC on the steps steps buy real jordans steps of the court immediately after the decision was announced.
Obama has had this around his neck for two and and authentic jordans and a half years. It will become an albatross around
neck of Barack Obama walking into November."Asked why it is is knockoff designer *beep* is necessary for the House to act again on repeal,
when there are not enough votes in the Senate to to [h4]imitation designer *beep*[/h4] to repeal it, Boehner also said the Supreme Court's ruling |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|