473,395 Members | 1,675 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

C#3.0 and lambdas

On Slashdot there is a discussion about the future C#3.0:
http://developers.slashdot.org/devel...?tid=109&tid=8

http://msdn.microsoft.com/vcsharp/future/

There are many differences, but it looks a bit more like Python:
http://download.microsoft.com/downlo...cification.doc

I like the lambda sintax enough. If there is a single parameter the
parentheses may be omitted. They are required if there aren't
parameters. The statement body allows the lambda to do anything.

x => x + 1 Expression body
x => { return x + 1; } Statement body
(x, y) => x * y Multiple parameters
() => Console.WriteLine() No parameters

The syntax seems nice, but for python the "Statement body" syntax can
be a problem.

Bye,
bearophile

Sep 18 '05
51 2128
Fredrik Lundh wrote:
Reinhold Birkenfeld wrote:
And I think the discussion that followed proved your point perfectly
Fredrik. Big discussion over fairly minor things, but no "big picture".
Where are the initiatives on the "big stuff" (common documentation
format, improved build system, improved web modules, reworking the
standard library to mention a few) Hey, even Ruby is passing us here.


This is Open Source. If you want an initiative, start one.


you know, this "you have opinions? fuck off!" attitude isn't really helping.


If I had wanted to say "you have opinions? fuck off!", I would have said
"you have opinions? fuck off!".

All I wanted to say is that if you want a common documentation format, and
you want it badly, you should show up on python-dev and offer help.
Unfortunately, there are not as many Python core developers as Perl core
developers, and things move at a slower pace. That's mostly not their fault,
and not anyone's fault. It's a consequence of the amount of time that is
spent on Python-the-core itself.

And why? Well, because it's more fun to program in Python than to program Python.

Reinhold
Sep 23 '05 #51
Mike Meyer wrote:
This is a well-known phenomenon, having picked up the name "bikeshed"
something like 40 years ago. Google for "bikeshed color".


My favourite "bikeshed" story:

A colleague just joined his local Primary School council. On the agenda
for his first meeting was that the shelter shed needed painting. There
were groans all around and someone said with a loud sigh, "I suppose
we'll have to get the colour consultants back."
Sep 26 '05 #52

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Michal | last post by:
Hi, Today I started with python and I cannot understand why expresion lambda x: print x returns syntax error (but for example lambda x: sys.stdio.write(x) does not) First I fought the reason is...
4
by: gong | last post by:
hi i would like to pickle a lambda; according to the library docs in 2.3, i believe this shouldnt be possible, since a lambda is not a function defined at the top level of a module (?) ...
6
by: John Fouhy | last post by:
So I'm trying to generate Tkinter callback functions on the fly, but it's not working, and I don't understand what's going on. Here is an example program: -------------------------- from...
2
by: Fernando Perez | last post by:
Hi all, there are a couple of threads on lambdas today, which got me curious about their differences as far as bytecode goes: planck|2> lf=lambda x: x**2 planck|3> def ff(x): return x**2 |.>...
5
by: Chris Johnson | last post by:
What I want to do is build an array of lambda functions, like so: a = (This is just a demonstrative dummy array. I don't need better ways to achieve the above functionality.) print ...
29
by: jmDesktop | last post by:
For students 9th - 12th grade, with at least Algebra I. Do you think Python is a good first programming language for someone with zero programming experience? Using Linux and Python for first...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.