[eeps] EEP about pseudo-assignment for Erlang

Raimo Niskanen <>
Tue Feb 5 15:39:15 CET 2013


On Tue, Feb 05, 2013 at 05:43:56PM +1300,  wrote:
> In the recent "if you're homesick for objects" thread,
> I found myself proposing two extensions to Erlang syntax
> to make life easier for people like Loïc Hoguin who want
> to update deep structure: virtual fields to flatten the
> apparent structure and S-style pseudo-assignment.
> 

The EEP has been accepted. Thank you for your contribution:

    EEP 41: Pseudo-assignment for Erlang

    http://www.erlang.org/eeps/eep-0041.html

I changed a few details; I hope the first were typos that now are correct,
or else I did not understand even the first example... Please let me know
if any of these corrections are incorrect.

Regarding references: I have never succeeded in getting them into the HTML
output and I think that is according to the original Markdown design
intent. In the HTML you can follow the links and do not need a references
list. I still miss it. So my "solution" is to hide the References heading
using ugly Markdown syntax probably not intended for this... Your spot
on remark in the references section I therefore removed just to hide the
whole References section from the HTML.

diff --git a/eeps/eep-0041.md b/eeps/eep-0041.md
index d27cfc4..ccb474d 100644
--- a/eeps/eep-0041.md
+++ b/eeps/eep-0041.md
@@ -27,19 +27,19 @@ Given the declarations
     centre(#rect{top=T,left=L,bottom=B,right=R}) ->
         {(L+R)/2, (T+B)/2}.
 
-    'centre:='(#record{top=T,left=L,bottom=B,right=R}, {X,Y}) ->
+    'centre:='(#rect{top=T,left=L,bottom=B,right=R}, {X,Y}) ->
         DX = X - (L+R)/2,
         DY = Y - (T+B)/2,
         #rect{top=T+DY,left=L+DX,bottom=B+DY,right=R+DX}.
 
 the pseudo-assignment
 
-    centre(W#whatever.area) := P
+    centre(W#whatever.region) := P
 
 expands to
 
     W' = W#whatever{
-           area = 'centre:='(W#whatever.area, P)}
+           region = 'centre:='(W#whatever.region, P)}
 
 with W' automatically replacing downstream mentions of W.
 
@@ -591,12 +591,8 @@ None in this draft, though implementation hints are
given.
 
 
 
-References
-==========
-
-There are five references here.  I do not know why they do not
-appear.  Using Markdown is not like dancing around eggs.  It
-is like dancing around hand grenades in the dark.
+[References]: <>
+"=========="
 
 [S]: http://en.wikipedia.org/wiki/S_%28programming_language%29
      "The S programming language"
@@ -624,3 +620,4 @@ This document has been placed in the public domain.
 [EmacsVar]: <> "fill-column: 70"
 [EmacsVar]: <> "coding: latin1"
 [EmacsVar]: <> "End:"
+[VimVar]: <> " vim: set fileencoding=utf-8 expandtab shiftwidth=4 softtabstop=4: "



> This EEP describes pseudo-assignment in some detail.
> 
> Expect an EEP on virtual fields within a week.
> 


> _______________________________________________
> eeps mailing list
> 
> http://erlang.org/mailman/listinfo/eeps


-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB


More information about the eeps mailing list