473,394 Members | 1,722 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,394 software developers and data experts.

Typed Python?

Moin,

short question: is there any language combining the syntax, flexibility and
great programming experience of Python with static typing? Is there a
project to add static typing to Python?

Thank you,

--
greetz tom
Jul 18 '05
176 7979
Ville Vainio wrote:
I have to admit I'm not aware of my unfamiliarity with the topic. I
was thinking of pattern matching as it is used in ocaml, assuming
scheme does the same.


I had't thought that my mentioning of "pattern matching" would incur a
new topic.

I do not use pattern matching every day. I mentioned pattern matching
simply due to my "Clean" experience. I must honestly admit that in
Clean pattern matching was natural. In Scheme one makes a good living
without it. However it is there in Bigloo and I red somewhere even a
note that Bigloo its pattern matching is bit more general than OCaml its
one. One may not forget that Manuel S. the developer behind Bigloo was
during his PhD work in computer science involved in the OCaml project
(there are some code snippets in OCaml which have been signed by him).

My Bigloo manual says to pattern matching:

==
Pattern matching is a key feature of most modern functional programming
languages since it allows clean and secure code to be written.
Internally, ``pattern-matching forms'' should be translated (compiled)
into cascades of ``elementary tests'' where code is made as efficient as
possible, avoiding redundant tests; Bigloo's ``pattern matching
compiler'' provides this. The technique used is described in details in
[QueinnecGeffroy92], and the code generated can be considered optimal
1due to the way this ``pattern compiler'' was obtained.

The ``pattern language'' allows the expression of a wide variety of
patterns, including:

• Non-linear patterns: pattern variables can appear more than once,
allowing comparison of subparts of the datum (through eq?)

• Recursive patterns on lists: for example, checking that the datum is
a list of zero or more as followed by zero or more bs.

• Pattern matching on lists as well as on vectors or structures.
==
Fensterbrett
Jul 18 '05 #151
Ville Vainio <vi***@spammers.com> writes:
I hereby declare that Jacek won,
Nonononooo ! I don't want to "win" anything.
Scheme kicks Pythons rear parts


In some areas. In others, Python kicks Scheme's.

I was not trying to say anything about Scheme in particular. It annoys
me to read repeatedly that something or other is not needed in Python:

We don't need pattern matching in Python.

We don't need mutable closures in Python.

We don't need native compilers in Python.

We don't need fully-fledged anonynmous functions in Python.

etc. etc. etc.

(It's particularly annoying to read this in response to someone saying
that he misses it in Python, and is putting it to good use in a
language which does provide it.)

I have two points to make about this:

a) Yes, we don't _need_ any of this. We don't need Python, a Turing
machine will do just fine.

b) The languages we use, _do_ influence the way we think about
programs: it is pointless to argue that a feature which is absent
from your language would not useful to you if it were available,
unless you are very familiar with its use in other languages,
because you will be arguing from a position of ignorance.
Jul 18 '05 #152
Jacek Generowicz <ja**************@cern.ch> wrote in message news:<ty*************@pcepsft001.cern.ch>...

I was not trying to say anything about Scheme in particular. It annoys
me to read repeatedly that something or other is not needed in Python:
It annoys me to read repeatedly that something or other is desperately
needed in Python. There are certain classes of features which could be
added without ruffling the feathers of the Norwegian Blue, but more on
those shortly.
We don't need pattern matching in Python.

We don't need mutable closures in Python.
Arguably, these features could quite possibly lie outside the design
"roadmap" of the language. Sure, we could add everything and then sit
on top of our nice ivory tower claiming "expressive completeness"
whilst smugly writing Fibonacci sequence generators for the next
thirty years and claiming some kind of victory (while the rest of the
industry just gets on with business).
We don't need native compilers in Python.


Actually, and I know that you agree with me here, we do need native
compilers. Perhaps "need" is a strong word to use, but I imagine that
many people would rather like native compilers if only to...

* Avoid dipping into C/C++ for performance and introducing the
usual reliability issues that this causes.
* Simplify "frozen" executable distribution.
* Permit development for embedded systems.
* <insert your idea here>

However, a lot of this work could hopefully be done without
introducing new keywords or syntax and deprecating a ton of stuff (or
at least people would get to make the explicit decision to enable the
breakage as a tradeoff for better performance). Sadly, a lot of people
seem to like the new keywords and syntax, the deprecation and, in
particular, the campaigning: "If only Python were more like my
favourite language then it would be my favourite language."

Perhaps the natively-compiled Python isn't quite Python as we know it
(consider Pyrex), and perhaps the kind of Python you envisage isn't
quite Python either (consider Prothon). But when most Python
developers would probably benefit most from infrastructural
improvements, I'd rather see spin-off languages than see Python taken
for a ride on a selection of language design bandwagons.

Paul
Jul 18 '05 #153
Michele Simionato wrote:
Also, if you don't take it as an offence, I can give you a suggestion
for a Scheme implementation you can look at, Chicken
(http://www.call-with-current-continuation.org/). I am not interested in
Bigloo since I don't care at all about being fast for numerical
analysis and I care more about other things, such as the object
system (Bigloo has a poor one because it want to be fast).


Hi:

Can you elaborate a bit why do you feel that Bigloo its object system is
limited the way it is.

I know some posts from you on comp.lang.scheme. I gather you have got a
good knowledge of Python its object system.

Can you try to summarize a short comparison between Bigloo its object
system vs. Chicken vs. Python its one.

Yes I know: different strokes for different people. But why do think
Bigloo falls short regarding its object system.
Fensterbrett
Jul 18 '05 #154
Jacek Generowicz schrieb:
Python provides no built-in support for pattern matching, therefore
your average happy Pythoneer will not be familiar with pattern
matching, the point of pattern matching, the benefits of pattern
matching, or the situations in which pattern matching is a big win.
If I understand correctly you mean that it makes a difference
whether it reads

s ~ /a.*b/

or

re.match('/a.*b/', s)

?

For me this is only a lexical issue. I use REs because I need them not
because they are builtins.
Python provides no built-in support for pattern matching, therefore
your average happy Pythoneer will not be familiar with pattern
matching, the point of pattern matching, the benefits of pattern
matching, or the situations in which pattern matching is a big win.
So you mean that one can only appreciate REs and learn to use
them if they are builtins? That's totally wrong, IMO. A beginner
learns REs because he finds them mentioned in the docs, in tutorials,
in newsgroups ... and understands their purpose. Builtins don't pop up
and say 'Use me, please', at least as long as there is no MS Perl :)
though - a couple of if-elif's will typically do fine (because
that's what pattern matching essentially is).

... yup, you prove my point exactly.


OK, all primes are odd. Proof: 47 ;). Ville has exaggerated a bit,
but I estimate that most RE uses can be replaced by string methods
like startswith, find etc. These are not only more readable but
also faster than REs AFAIK.
My point is, of course, not specific to Python or to pattern matching;
you can replace them with any language, and any feature missing from
that language.


Yes, poor C++ programmers are desperately trying to open files:

?> C++ provides no built-in file I/O, therefore your average happy C++
?> programmer will not be familiar with file I/O, the point of file I/O,
?> the benefits of file I/O, or the situations in which file I/O
?> is a big win.

:))

Mit freundlichen Gruessen,

Peter Maas

--
-------------------------------------------------------------------
Peter Maas, M+R Infosysteme, D-52070 Aachen, Tel +49-241-93878-0
E-mail 'cGV0ZXIubWFhc0BtcGx1c3IuZGU=\n'.decode('base64')
-------------------------------------------------------------------
Jul 18 '05 #155
Peter Maas wrote:
Jacek Generowicz schrieb:
> Python provides no built-in support for pattern matching, therefore
> your average happy Pythoneer will not be familiar with pattern
> matching, the point of pattern matching, the benefits of pattern
> matching, or the situations in which pattern matching is a big win.


If I understand correctly you mean that it makes a difference
whether it reads

s ~ /a.*b/

or

re.match('/a.*b/', s)

?


I am not sure what you personally understand under pattern matching.

However, since they are discussing about pattern matching the following
may help:
(from list.ml; see Ocaml's standard distribution)
==
let rec map2 f l1 l2
match (l1, l2) with
([], []) -> []
| (h1::t1, h2::t2) -> let r = f h1 h2 in r::map2 f l1 l2
| (_, _) -> invalid_arg "List.map2"
==

.... and compare it with the following Bigloo function:

==
(define (map2 fun lis1 lis2)
(match-case (list lis1 lis2)
((() ()) '())
(((?h1 ???t1) (?h2 ???t2))
(cons
(fun h1 h2)
(map2 fun t1 t2)))
((?- ?-) (error "map2"
"invalid list argument" (list lis1 lis2))))
==

Fensterbrett
Jul 18 '05 #156
Siegfried Gonzi <si*************@stud.uni-graz.at> wrote in message news:<cc**********@newsreader1.utanet.at>...
Can you elaborate a bit why do you feel that Bigloo its object system is
limited the way it is.

I know some posts from you on comp.lang.scheme. I gather you have got a
good knowledge of Python its object system.

Can you try to summarize a short comparison between Bigloo its object
system vs. Chicken vs. Python its one.

Yes I know: different strokes for different people. But why do think
Bigloo falls short regarding its object system.


I remember I looked at Bigloo's object system last year, and I may forgot
something now, so please correct me if I am wrong. It seems to me it was a
single inheritance object system with no meta-object protocol and some
strange concept of "widening"-"shrinking" I did not understood. At the
time I wanted to study CLOS (which is often regarded as the most sophysticated
object system ever) and Chicken had TinyClos, so it was better for my aims.
Also, I wanted to stay with Scheme and not with Common Lisp for various reasons.
The biggest difference between CLOS and Python object system are multimethods,
which Python misses. Multiple inheritance and MOP in Python are good enough
instead.

Michele Simionato
Jul 18 '05 #157
Siegfried Gonzi schrieb:
I am not sure what you personally understand under pattern matching.

However, since they are discussing about pattern matching the following
may help:


Oh. Thanks for correcting me and my apologies to Jacek. I should
have read the thread from the beginning but it was way too long. :)

Mit freundlichen Gruessen,

Peter Maas

--
-------------------------------------------------------------------
Peter Maas, M+R Infosysteme, D-52070 Aachen, Tel +49-241-93878-0
E-mail 'cGV0ZXIubWFhc0BtcGx1c3IuZGU=\n'.decode('base64')
-------------------------------------------------------------------
Jul 18 '05 #158
Michele Simionato wrote:


I remember I looked at Bigloo's object system last year, and I may forgot
something now, so please correct me if I am wrong. It seems to me it was a
single inheritance object system with no meta-object protocol and some
strange concept of "widening"-"shrinking" I did not understood.
I am not an expert in CLOS programming. But what are the disadvantages of not having a meta-object protocol? What
is hard to realize then?


Fentserbrett

Jul 18 '05 #159
Peter Maas <pe********@mplusr.de> writes:
Jacek Generowicz schrieb:
> Python provides no built-in support for pattern matching, therefore
> your average happy Pythoneer will not be familiar with pattern
> matching, the point of pattern matching, the benefits of pattern
> matching, or the situations in which pattern matching is a big win.


If I understand correctly you mean that it makes a difference
whether it reads

s ~ /a.*b/

or

re.match('/a.*b/', s)

?


I am afraid you do not understand correctly.

What I was talking about had nothing to do with regular expressions.

For more hints, look upthread.
Jul 18 '05 #160
Peter Maas <pe********@mplusr.de> writes:
Oh. Thanks for correcting me and my apologies to Jacek.
No probs.
I should have read the thread from the beginning but it was way too
long. :)


.... I know the feeling :-)
Jul 18 '05 #161
[Ville Vainio]
[François Pinard]
Suddenly backtracking out of a complex involvement for restarting
in a new direction, for the above project at least, requires a lot
of state resumption, and doing this cleanly in Python implies a
rather strict and burdening discipline about where and how the state
information is kept.

Would such a problem be solvable if you could pickle a "running"
generator?
Not really. Generators could be used in chains (of generators), each
element of the chain usually being some local variable in another
element, and pickling one is meaningless if you cannot pickle them
all. Moreover, the serialisation implied by pickling would usually be
extraneous and unwanted overhead to the whole process of saving and
restoring generator state.
So, is there some deep philosophical (as opposed to implementation
detail) flaw in the picklable generator idea?


I'm not a deep philosopher, so I cannot say! :-)

--
François Pinard http://www.iro.umontreal.ca/~pinard
Jul 18 '05 #162
[Christopher T King]
[François Pinard]
Suddenly backtracking out of a complex involvement for restarting
in a new direction, for the above project at least, requires a lot
of state resumption, and doing this cleanly in Python implies a
rather strict and burdening discipline about where and how the state
information is kept. While tractable, this is not as comfortable as
I would have liked it...

It may be possible to do what you want to do using only generators. continuation=dostuff()
try:
value=continuation.next()
except StopIteration:
<store continuation away for future use>
else:
<function completed, carry on>
If the generator gets exhausted, what would be the purpose of saving it?

I would presume chained generators might ease control of the flow, at
least to a certain extent, but would not help so much for complex state
resumption, especially when state is shared between parts of the program.
Dunno if this helps or not....


Thinking always help! Thanks for sharing your thoughts.

--
François Pinard http://www.iro.umontreal.ca/~pinard
Jul 18 '05 #163
Siegfried Gonzi <si*************@kfunigraz.ac.at> wrote in message news:<40***************@kfunigraz.ac.at>...
I am not an expert in CLOS programming. But what are the disadvantages of not having a meta-object protocol? What
is hard to realize then?


This is the kind of questions which would require a book for
even a partial answer :-( In the Lisp world there is "The Art of
the Metaobject Protocol", in the C++ world there is "Putting Metaclasses
to Work", in the Java world there are various books on AOP (anyway
the MOP is not the same as AOP: the MOP is a general framework which
you can use to implemente Aspect Oriented Programming. Metaclasses and
metaobject protocol are essentially the same thing).

I feel the standard answer you get in this case (the MOP is for the ones
who knows why it is useful, if you don't, forget about it) to be a little
frustrating but it is rather difficult to come up with a better answer.

So, what I will do, is to give you an example of the last case where I
used Python metaclasses in a real life application. You will deduce for
yourself if you are missing something useful or not.

My use case was hacking PloneTestCase, the Plone testing framework to
avoid startup times. What I did was to implement a command line
interpreter to execute my tests, reload modules, and similar things.

Python has a beatiful facility for writing command line interpreters,
the "cmd" module in the standard library. You just derive the
cmd.Cmd class and write your commands as methods starting with "do_":

do_this(self, arg), do_that(self, arg)

I had only few commands, it was useful for me to have one-letter aliases:
this means to generate an alias for each method starting with "do_".
You can do that with a function applied to the class, without the MOP.
However, if I subclass later my custom command class, I would like to maintain
the automatic alias feature (this feature has only meaning if I have
less than 26+26 commands of course, otherwise there will be conflicts
so it is not a scalable solution, but this was a quick & dirty hack,
not a masterpiece of software). In order to preserve the feature under
inheritance, you need a metaclass. Here is the solution:

# cmd_with_aliases.py
import cmd

class make_oneletter_aliases_for_commands(type):
"""Typically used in Cmd classes."""
def __init__(cls, name, bases, dic):
for name,func in dic.iteritems():
if name.startswith("do_"):
firstletter = name[3]
setattr(cls, "do_" + firstletter, func)

class Cmd(cmd.Cmd, object): # make it a new-style class
__metaclass__ = make_oneletter_aliases_for_commands
def preloop(self):
"""Done once at the beginning."""
cmd.Cmd.preloop(self)
self.do_greetings("World!")

def do_greetings(self, arg):
"""Display a greeting message."""
print "Hello, %s!" % arg

def do_help(self, arg):
"""Print this help message."""
super(Cmd, self).do_help(arg)

def do_quit(self,arg):
"""Exit the command-loop."""
return 'quit' # anything != None will do

Cmd().cmdloop()
Here is the usage:

~/md/python/Various $ python cmd_with_aliases.py
Hello, World!!
(Cmd) help

Documented commands (type help <topic>):
========================================
g greetings h help q quit

(Cmd) h

Documented commands (type help <topic>):
========================================
g greetings h help q quit

(Cmd) greetings Michele
Hello, Michele!
(Cmd) q
~/md/python/Various $

As you see g,h and q are aliases for greeting, help and quit.
"help greetings" or "help g" or "h greetings" or "h g" all work:

(Cmd) h g
Display a greeting message.
(Cmd) h greetings
Display a greeting message.
(Cmd) help greetings
Display a greeting message.

For me the metaclass solution was the simplest and easier solution
for this job.

I have written a couple of papers on metaclasses in Python that you may
find easily (look at the Python Wiki for instance) and more justifications
for the MOP are given. I mostly use it for hacks concerning testing and
debugging. If I was a framework builder I would have a better use for
it. If I was writing numerical code I would probably not miss it
(I mean, Fortran is not even OO but works pretty well for numerical
tasks). MOP is good if you are writing code for others to use
(for instance if you are writing a command line interpreter as in
this example). As another example, I used metaclasses and descriptors to
hack Python object model in a prototype based one, as a proof of
concept. You can do any kind of fearful hacks (google this newsgroup
for metaclasses). There is really a *lot* you can do. But in 99.9%
of my real life programming I have no use for the MOP.

So, it is up to you to decide if is something worthy or not to learn.
Michele Simionato
Jul 18 '05 #164
Michele Simionato wrote:
So, it is up to you to decide if is something worthy or not to learn.

I posted ("Bigloo and the lack of a MOP") some questions on comp.lang.scheme because I do not grasp why one would
implement an object system without a perceived valuable meta object protocol.

I mean what are the motivations behind such adventures. I found a thread on google where they say that not having a
meta object protocol is simply a matter of style and preference and one can realize all such things with MERON too.

Fensterbrett


Jul 18 '05 #165
mi***************@gmail.com (Michele Simionato) wrote in message news:<4e*************************@posting.google.c om>...
(I mean, Fortran is not even OO but works pretty well for numerical
tasks).


As of the 2003 standard, Fortran supports OOP, including inheritance.
The NAG Fortran compiler is not a full F2003 compiler, but it has the
OOP features -- see http://www.nag.co.uk/nagware/NP/NP50_announcement.asp
..

Fortran 95 supports object-based programming -- there is no
inheritance, but you can define data types with public and private
members, and these data types can be used as procedure arguments.

But I agree with your main point -- you can write good numerical
software in Fortran without OO.
Jul 18 '05 #166
be*******@aol.com wrote in message news:<30**************************@posting.google. com>...
mi***************@gmail.com (Michele Simionato) wrote in message news:<4e*************************@posting.google.c om>...
(I mean, Fortran is not even OO but works pretty well for numerical
tasks).


As of the 2003 standard, Fortran supports OOP, including inheritance.
The NAG Fortran compiler is not a full F2003 compiler, but it has the
OOP features -- see http://www.nag.co.uk/nagware/NP/NP50_announcement.asp
.

Fortran 95 supports object-based programming -- there is no
inheritance, but you can define data types with public and private
members, and these data types can be used as procedure arguments.

But I agree with your main point -- you can write good numerical
software in Fortran without OO.


Thank you for your clarification and for the link. I was aware of Fortran 2003
(thanks to another post of yours some time ago ;) but as you guessed my
main point was that you can do a lot of good work without needing an
object system. Personally, I am not OO bigot and I have no problem in
using non-OO languages. Actually, I have a lot of Python code which is
not OO, because I feel OO constraining or too verbose for many tasks,
whereas invaluable for other tasks (in particular, programming in a
corporate environment).

Coming back to the original poster, I don't think that Bigloo object
system is crippled because it lacks a MOP: but in that period of time
I wanted to learn CLOS and not Meroon, so I did not consider Bigloo
further. That's all.

A MOP gives you more power but also makes your code more magical
and more difficult to debug, so take in account this fact in when
deciding if using a MOP or not.
Michele Simionato
Jul 18 '05 #167
Siegfried Gonzi <si*************@kfunigraz.ac.at> writes:
I am not an expert in CLOS programming. But what are the
disadvantages of not having a meta-object protocol?
What you're asking is "What is the point of a meta-object protocol?".

The point of a meta-object protocol is to make your object system
programmable; to be able to tune your object system to the needs of
your application.
What is hard to realize then?


.... tuning the behaviour of your object system, adapting your object
system to the requirements of your program.
Jul 18 '05 #168
[Siegfried Gonzi on Tue, 13 Jul 2004 at 10:31:22]
what are the disadvantages of not having a meta-object protocol?
What is hard to realize then?
[Siegfried Gonzi on Wed, 14 Jul 2004 at 15:48:15]
I do not grasp why one would implement an object system without a
perceived valuable meta object protocol.
You appear to have gone from not seeinig the point of a MOP, to not
seeing why one would implement an object system without one, in under
29 hours, 16 minutes and 53 seconds. Must be some sort of world
record. (Mechele's answer must have made a huge impression on you.)

You like going from extreme to extreme, don't you :-)

[Siegfried Gonzi]
I posted ("Bigloo and the lack of a MOP") some questions on
comp.lang.scheme because I do not grasp why one would implement an
object system without a perceived valuable meta object protocol.
Why pick on Scheme?... you should post the same questions on
newsgroups talking about C++, Java ... the vast majority of languages
supporting OO languages on earth, in fact ... of which Scheme is not
really one, as all OO support in Scheme is via implementation specific
language extensions.

All in all, a pretty poor choice of newsgroup ... well, at least you
didn't post it on rec.sport.korfball :-) (Or alt.cleaning-utensils.mop)
I mean what are the motivations behind such adventures.


Yes, I do wonder (your usenet adventures, that is).
Jul 18 '05 #169
Jacek Generowicz wrote:
I do not grasp why one would implement an object system without a
perceived valuable meta object protocol.
You appear to have gone from not seeinig the point of a MOP, to not
seeing why one would implement an object system without one, in under
29 hours, 16 minutes and 53 seconds. Must be some sort of world
record. (Mechele's answer must have made a huge impression on you.)


You know the sentence is not meant as you read it. Why do you insist that
I personally "perceive" a MOP valuable?

Why pick on Scheme?...
Why not?
you should post the same questions on
newsgroups talking about C++, Java ...


You got me. I think my posts are not that much entertaining than yours.

Jul 18 '05 #170
Michele Simionato wrote:


Coming back to the original poster, I don't think that Bigloo object
system is crippled because it lacks a MOP: but in that period of time
I wanted to learn CLOS and not Meroon, so I did not consider Bigloo
further. That's all.


Hi:

Pascal C. made some interesting remarks to my post on comp.lang.scheme.

I do not object the usefullness of a MOP. I was more after the connection between MOP and Bigloo. And the appropiate usegroup
for this quest might be comp.lang.scheme.

Jul 18 '05 #171
Siegfried Gonzi <si*************@kfunigraz.ac.at> writes:
Jacek Generowicz wrote:
I do not grasp why one would implement an object system without a
perceived valuable meta object protocol.
You appear to have gone from not seeinig the point of a MOP, to not
seeing why one would implement an object system without one, in under
29 hours, 16 minutes and 53 seconds. Must be some sort of world
record. (Mechele's answer must have made a huge impression on you.)


You know the sentence is not meant as you read it.


I admit that I sometimes deliberately interpret things in a way which
they were not originally intended. However, I am not doing it in this
case.
Why do you insist that I personally "perceive" a MOP valuable?


I do not insist; I implied it just once.

I implied it, because that is what I inferred from your choice of
words. My interpretation could well be wrong.
Why pick on Scheme?...


Why not?


Because Scheme is irrelevant to the question you seem to be asking
.... but I appear not to be able to interpret your words correctly, so
Scheme may well be central to the issue for all I know.

Because "picking" on languages and posting provocative articles in the
languages' newsgroups wastes a lot of people's time. I guess you do it
inadvertently, but you do seem to do it rather a lot (all based on
recollections of posts I associate with you across various NGs over
some period of time; I may be misremembering: if so, I
apologize. Also, it is likely that your most memorable threads are the
ones that stick in my memory ... so I'm likely to have a lop-sided
recollection of your posts).

[Googling ...]

Your opening shot in the c.l.scheme thread you started is:

Someone explained to me on comp.lang.python that Bigloo its object
system is crippled due to its lack of a meta object protocol.

You really know how to put the reader in the right mood for reading
the rest of your post. Fortunately enough, you distance yourself
sufficiently from the negative implications of your opening shot,
later on in the article.

But this is turning into an ad-hominem subthread (and I set us off on
that course, so I apologize) ... so let's not continue in that
direction.

I should have said: "Your question isn't really relevant to Scheme"
and left it at that.
Jul 18 '05 #172
Jacek Generowicz wrote:


I should have said: "Your question isn't really relevant to Scheme"
and left it at that.


a) Yes it is not essentially related to Scheme. You are right, but:

b) However, it is related to Bigloo and MEROON. Do you know any Java
programmers who knows MEROON.

My interest actually was: Bigloo and its connection to this MOP stuff. And
to my knowledge Bigloo is Scheme.

I am not expecting that they will explain me MOP on comp.lang.scheme. But I
hoped to get some hints why Bigloo or MEROON is as it actually is.

Peace.
Jul 18 '05 #173
Siegfried Gonzi <si*************@kfunigraz.ac.at> writes:
Jacek Generowicz wrote:


I should have said: "Your question isn't really relevant to Scheme"
and left it at that.
a) Yes it is not essentially related to Scheme. You are right, but:

b) However, it is related to Bigloo and MEROON. Do you know any Java
programmers who knows MEROON.


No, but that's because I try to avoid knowing Java programmers :-)
My interest actually was: Bigloo and its connection to this MOP stuff. And
to my knowledge Bigloo is Scheme.


Bigloo is Bigloo. OK, Bigloo contains most of Scheme within it ... but
its additions are NOT scheme, and it's object system is an addition.

OTOH, given that Scheme has no object system, and yet, most
implementations do have one, it is probably of general interest on
c.l.s.

But this thread has made me aware of Meroon, and that

- it is ported to many Schemes (including Bigloo, so Bigloo's object
system not having a MOP becomes a non-issue)

- it has CLOS-like generic functions

- it has a MOP

.... which (if the blurb is to be believed) makes Scheme altogether
more interesting for me ... and I might just consider it in future
projects ...

.... so I thank you for making me aware of Meroon.
Jul 18 '05 #174
Jacek Generowicz <ja**************@cern.ch> wrote in message news:<ty*************@pcepsft001.cern.ch>...
OTOH, given that Scheme has no object system, and yet, most
implementations do have one, it is probably of general interest on
c.l.s.
It would be more correct to say that Scheme has no *standard* object
system, so most implementations provide *more* than just one object
system.

For instance MzScheme has his own (non-remarkable IMHO) object system
(actually two versions of it) and Swindle (which is essentially CLOS);
Chicken has both TinyClos and Meroon, idem for Guile. I don't know about
the other hundreds Scheme implementations, but from here

http://www.call-with-current-continu...gs/meroon.html

I gather the following info:
"""
MeroonV3 is an object system written in Scheme that works
under Bigloo, Elk, Gambit, Guile, MacScheme, MIT-Scheme,
OScheme, PC Scheme, PCS/geneva, Scheme->C, SCM and vscm
interpreters. It also runs faster when compiled with
Bigloo, Gambit and Scheme->C, see below.

<snip>
"""
But this thread has made me aware of Meroon, and that

- it is ported to many Schemes (including Bigloo, so Bigloo's object
system not having a MOP becomes a non-issue)

- it has CLOS-like generic functions

- it has a MOP

... which (if the blurb is to be believed) makes Scheme altogether
more interesting for me ... and I might just consider it in future
projects ...

... so I thank you for making me aware of Meroon.


Yes, I got curious and I would like to look at it too, if I had the time!
Michele Simionato
Jul 18 '05 #175
mi***************@gmail.com (Michele Simionato) writes:
Yes, I got curious and I would like to look at it too, if I had the time!


Indeed ... I desperately need to find the time to go down to the time
shop and some time for doing all these things :-)
Jul 18 '05 #176
Jacek Generowicz <ja**************@cern.ch> wrote in message news:<ty*************@pcepsft001.cern.ch>...
... which (if the blurb is to be believed) makes Scheme altogether
more interesting for me ... and I might just consider it in future
projects ...


The following link to comp.lang.scheme/slashdot has nothing to do with
Python whatsoever. But I think it will finalize the discussions and
the thread about pattern matching and the object system and its
usefullness in real life projects:

http://groups.google.com/groups?dq=&...TF-8%26hl%3Den

Fensterbrett
Jul 18 '05 #177

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

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.