Hello,
I've been watching Elixir from afar for some time while using
SQLAlchemy. When using SQLAlchemy I've been using the mapping
functions inside of SQLAlchemy directly, and like many I've found that
to be somewhat repetitive and less than intuitive. I had Elixir
recommended to me by a few people, but the syntax has turned me off to
it. I'm aware that the DSL nature of it will allow you to create your
own statements, and I do realize this is a powerful feature, but it's
not what I was looking for in an ORM wrapper.
I was looking for was a syntax that allowed me to write natural Python
classes - not unlike what Django's syntax is now, or what TurboEntity
used to have. A rails-style DSL has it's advantages, but I doubt I'm
alone in feeling that, if nothing else it /looks/ awkward. Simply put,
when I want to say that a object will have an integer field, I'd
expect to write:
class MyObj(ParentClass):
number = Integer
This is close to both the SQLAlchemy and Python ways of doing
things. On the other hand, I just find that:
class MyObj(ParentClass):
has_field('number', Integer)
doesn't convey what I was trying to code: I wanted an Object with a
.number attribute that is an Integer. Putting it into a string means
that the backend code has to do some setattr(obj, 'number',...) magic,
and advantages of being able to define your own statements
notwithstanding, being able to write idiomatic Python code was what I
was looking for in a declarative layer.
So, mostly I'm just wondering if the devs would be amenable to a
"traditional" syntax for Elixir, and if users would be interested in
seeing it, or if the DSL syntax is OK for most programmers. I know
that Ben Bangert brought up this issue back in May and the decision
was to "steer clear of the discussion" for the time being, but now
seems like as good a time as any to bring it back up :). I'm not
averse to starting a separate project for an OOP-style declarative
layer, but I do want to touch base here to make sure that it isn't
something that's planned as an Elixir feature.
Thanks for your work!
Adam Gomaa
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SQLElixir" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---