Functional Programming and python

rusi rustompmody at gmail.com
Tue Sep 24 13:25:07 EDT 2013


On Tuesday, September 24, 2013 8:56:21 PM UTC+5:30, Chris Angelico wrote:
> On Wed, Sep 25, 2013 at 1:07 AM, rusi  wrote:
> > And this is an old conundrum in programming language design:
> >
> > In C printf is easy to write and NOT put into the language but into external libraries
> 
> > In Pascal, writeln cannot be outside the language because as a user defined function, its type would not fit the type system.
> >
> > And so printf can be made to crash quite easily; not so writeln!
> 
> I assume you're talking about mismatching percent-markers and
> arguments, there. That's because of a limitation in C's variadic
> function support, ameliorated somewhat by gcc's warnings system, and
> completely solved by other languages in which (s)printf can still be
> an external function, but with reliable type checking. It's not
> whether it's part of the language or not that does that.

Sure there can be and are specific workarounds.

My point was a general one:
Strong type system: Some desirable programs will get kicked out
Weak type system: Some undesirable programs will slip in
'Exactly' correct type system: Impossible by halting problem 



More information about the Python-list mailing list