Ideas for Python 4

R

Ryan Gonzalez

I have a bunch of ideas I'd like to share for Python 4:

Use -- for comments instead of #.

Switch to <> for "not equal" instead of !=.

Remove indentation requirement:

-- Python 2&3
if x != y:
return 7

-- Python 4
if x <> y:
return 7
;;

Add multiline lambdas:

my_multiline_lambda = ll { return 7; }

Add implicit lambdas using a clear, simple, and concise syntax:

my_implicit_lambda = ??[0] + ??[1] if ??#? != 0
-- ?? = argument dictionary
-- ??#? = argument count

Add method chaining using even easier syntax:

a = SomeObject()
b = a->>>m2->>>m3->>>m4!!;;

-- Call m2, then m3, then m4, then return the resulting object

-- BTW, April Fools! This is ugly...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top