Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Pythonect Call for Syntax! All feedback and comments are appreciated!

13 views
Skip to first unread message

Itzik Kotler

unread,
May 31, 2012, 4:28:47 PM5/31/12
to
Hi All,

Pythonect is almost two months old and I think it's a good time to
promote
a design discussion on the language syntax.
The current syntax works great, but it is limited, and makes writing
complex programs difficult. For example:

range(99, 0, -1) | str -> _ + " bottle(s) of beer on the wall," ->
print ->
_.split(" on")[0] + '.' -> print -> print("Take one down, pass it
around,")

This is a variant of '99 Bottles of Beer' program written in
Pythonect, and
it's not the easiest code to read and understand.

I am looking for syntax proposals to complement Pythonect syntax, and
I
have started a wiki page for it at:

https://github.com/ikotler/pythonect/wiki/Call-For-Syntax

Anyone can edit the syntaxes wiki page and add a new syntax proposal.
A
proposal can be a new idea, based on another, or mix-up of two or
more.
Also, please include with each proposal (in the wiki) the following
programs written in the proposed syntax:

* Hello World program
* 99 Bottles of Beer program
* Multithread Counter (a simple loop that prints from 1 to 10 in each
thread) program

This will help show the look and feel of the proposed syntax, as well
as to
be able to compare it to another proposal.

To kick off the discussion, I have added 4 potential syntaxes (Python-
like,
C-like, Musical notation like, and F#-like) to the wiki page, and I am
looking forward to have them reviewed.

All feedback and comments are appreciated.

Itzik Kotler

Itzik Kotler

unread,
May 31, 2012, 3:16:38 PM5/31/12
to
Hi All,

Pythonect is almost two months old and I think it's a good time to promote a design discussion on the language syntax.
The current syntax works great, but it is limited, and makes writing complex programs difficult. For example:

range(99, 0, -1) | str -> _ + " bottle(s) of beer on the wall," -> print -> _.split(" on")[0] + '.' -> print -> print("Take one down, pass it around,")

This is a variant of '99 Bottles of Beer' program written in Pythonect, and it's not the easiest code to read and understand.


I am looking for syntax proposals to complement Pythonect syntax, and I have started a wiki page for it at:

https://github.com/ikotler/pythonect/wiki/Call-For-Syntax

Anyone can edit the syntaxes wiki page and add a new syntax proposal. A proposal can be a new idea, based on another, or mix-up of two or more.
Also, please include with each proposal (in the wiki) the following programs written in the proposed syntax:

* Hello World program
* 99 Bottles of Beer program
* Multithread Counter (a simple loop that prints from 1 to 10 in each thread) program

This will help show the look and feel of the proposed syntax, as well as to be able to compare it to another proposal.


To kick off the discussion, I have added 4 potential syntaxes (Python-like, C-like, Musical notation like, and F#-like) to the wiki page, and I am looking forward to have them reviewed.

BartC

unread,
Jun 3, 2012, 12:59:33 PM6/3/12
to
"Itzik Kotler" <xorn...@gmail.com> wrote in message
news:f68cb404-6477-43cf...@googlegroups.com...

> I am looking for syntax proposals to complement Pythonect syntax, and I
> have started a wiki page for it at:
>
> https://github.com/ikotler/pythonect/wiki/Call-For-Syntax

> All feedback and comments are appreciated.

They all look the same to me! Except they all have "[" and "]" in different
places.

For example, here is your Hello World program in C (or C-like syntax, but
you expect something not far off):

"Hello, world" -> [
print
]

Here it is in real C:

#include <stdio.h>
int main (void)
{
printf("Hello, world\n");
return 0;
}

The Python-like version is not much like Python either (and the musical
notation one is unlike any sheet music I've ever seen...).

Not criticising the syntax, but you might be disappointing C and Python
programmers who could be expecting something more familiar. Perhaps choose
your own style and not worry about looking like something else. (Or are
these all contributions from various people? I don't know how it works.)


--
Bartc

0 new messages