I definitely recommend Go. Not only for the language itself, but for the lesson about simplicity it provides. Sometimes developers using others languages uses and abuses of features to be productif, smart, ... causing more damage than benefict. It's not the way to do things in Go.
Go is multiplatform, and you can easily cross-compile for other OS or other CPU architecture. It produces a single binary then it's easy to deploy. It could be useful.
Go is really easy to learn, in a single day you will have a good understanding of the language itself. It's really something interesting to learn and practice a bit, without needing weeks of work. Even if it doesn't suit you, you had not loss many time.
The projet started as a learning one. I made some independent and experimental component from time to time, and then glued them together, rewriting some parts, ...
Why this kind of project ? Because I used Active Record (Rails), Entity Framework, played with Django ORM, ... and regretted that nothing similar exist in Go world. Instead of complaining I choose to do something, not building a full ORM by myself, but at least build something allowing me to have a better comprehension of the constraints (except of the classic "no generic").
I didn't choose to build another Go library thinking I'll build something better than others. I learned, and I got a library ;)
Well, now that you're done learning I hope you'll become an sqlboiler user and maybe contribute to it to fit your use case too. Fragmentation in the sql world in Go is pretty bad right now, hence my reaction to seeing your lib, sorry for that :)
Splits development effort, slips developer skill across many options. Means everyone wastes time re-inventing the wheel instead of solving the problems they want to.
I want to see the Go community and it's libraries flourish. But having libraries like this around which provide extra confusing and probably poorly maintained choices for users is detrimental to it's overall health. There's already great examples of maintenance rot found even amongst the very popular libraries like go-yaml and httprouter.
One thing you can say about Go is it has 1000 Micro-frameworks, ORMs, Routers, and Logging libraries. Most of them are within a percent of giving the exact same feature set with the exact same approach and and ever so slightly different API. Lots of them share the same mistakes as they are a user's first project or a learning arena (though routing has been a pretty benchmarked area so that's been better than the others).
As someone who has open source libraries, and who uses Go in their day job and at home my personal opinion is that Go needs fewer, stronger libraries. Well supported, well maintained pieces rather than this illusion of choice that's presented today. I'm sorry if I came off as crass in my reply to the OP but that's simply the state I see in the community today.
Ideally there'd be 2-4 ORMs in Go that would be the goto. And half would use a code-generation approach, half would use the reflection based approach.
Do we truly need this? This one in particular feels a lot like upperdb. And if it's for learning only, don't publish it to things like hackers news which makes people seem like it's something you should use as opposed to the more mature libraries out there. This is what I meant by fragmentation, it's an illusion of choice. There are actually very few logging/routing/orm/micro-framework libraries you should really use if you're serious about a project.
Kindly: you are not the gatekeeper of other's efforts, contributions, and submissions. Saying "you shouldn't have written this, open sourced it, or submitted it to hnews because I think my library is much better" is obnoxious behavior that I think is far more damaging to a community than fragmentation. People will consolidate choice of libraries with time. We shouldn't be shutting down new contributions reflexively, and it's much more distasteful when it's because you're advocating for your alternative.
An incredibly rude post in reply to something I think is reasonable. My opinion is as I stated, NOT as you very loosely interpreted thank you very much. I don't think of myself of a gatekeeper of others, just my own things.
I have a very high bar for open source personally and I tend to view it "more hardcore". I think that if you're putting open source out there to a wide audience such as this that you have a contract with the people you're putting it out to that you're going to maintain what's there and ensure it's of high quality. And if you're going to go to that level of effort why not contribute to something that's already mountains of work ahead of you and effectively the same code anyway (upperdb/gorp/gorm/xorm in this case)?
I have many Go repositories on my Github account that I've used for learning - but I've never put any of them out there to wide audiences that were solved by a more popular project in the same way - the approach has always been radically different. When I couldn't find logging libraries I liked I tried using others and contributed to them. I've also never put anything out there that I don't intend on maintaining basically forever. So my behavior is consistent with my viewpoint for whatever that's worth.
My colleague suggests that other people use open source for different reasons and view it much differently than me, and that's possibly the misunderstanding here. I shouldn't try to reflect my opinion in that sense on others and I do apologize for that. I suppose "if it were me" I wouldn't have done what he has, and I was commenting as if people knew and understood that as a commonality - which isn't probably true.
Also - I think you hugely overstated my bias for my own library. I'd be just as happy if he had not posted this and worked on gorp instead. /shrug.
Also I've been waiting for a long time for Go's libraries to be converged on - hasn't happened yet :)
It sounds like he's advocating for one of the many solid alternatives, not HIS alternative. Seems like a very fair argument to me. Why do we need more half-completed projects masquerading as if they should be used by people as serious alternatives, when they are not? If people want to waste their time re-inventing the wheel then so be it, that's their prerogative, but I do believe it is fair to say that it's a detriment to the community when every one of these "learning projects" that has nothing to contribute to the current climate is shared around as if it's a valid alternative to something that is complete and well supported.
Yes, you did came off as a bit hostile in your comments.
But I really liked this answer of yours.
Also, You need to be aware that Show HN is a great tool for people to get quality feedback for their work, even if it is in early stages.
I took care of that, caching structs metadata to limit useless repetitive introspections, and others simple stuffs. But of course if will always be slower than manually crafted code.
With Go the cost is ridiculous compared to round trips with database server and query execution. More productivity for just a bunch of CPU cycles. Of course each use case and constraints are different, they're is no universal rules.
Entity Framework... that is slow ! I don't know for EF Core, but EF6 is really a slow thing.
ORM is a tool to map an object model (with which the developer interacts) onto a relational one, the R part is the one which ORMs try to hide, not the one they're trying to surface.
Relational comes from Relation which means "table", not relationship.
There's no relationship between 2 tables. You're probably referring to foreign keys, but these are just constraints, not relationships in the sense you're alluding in your comment.
While that may be true in the definition of a relational database, that is not generally what is meant by an ORM. The relationships between objects are a key part of what an ORM would provide.
Relation DOES NOT mean table. Relation does mean relations in the context of the Entity/Relationship model. It has nothing to do with tables, at all. So you are partially right technically I should have used the word entity, not table. But relation does not mean table again.
<<The object-relational impedance mismatch is a set of conceptual and technical difficulties that are often encountered when a relational database management system (RDBMS) is being served by an application program (or multiple application programs) written in an object-oriented programming language or style, particularly because objects or class definitions must be mapped to database tables defined by relational schema.>>
Open any DBMS book. Pick one at random and read the definition of a "relation". It's always going to be "table".
<<An object-relational mapper (ORM) is a code library that automates the transfer of data stored in relational databases tables into objects that are more commonly used in application code.>>
I agree, it’s a simple tool. As mentioned in the README, it’s not a full-featured ORM, but it does more than building queries as it maps Go structs with databases content (on this point I disagree as it use objects).
The purpose is to be more productive than doing all this job manually.
Many things can be improved, it's sill a young project. This project is initially a learning one : doing stuff to improve my skill, on my spare time. I tried to build something clean, and used it on some real data. Perhaps it could be useful for somebody else. Nothing more ;)
That's a technicality, it just loads query data into objects which is what more or less every query builder does, the objects aren't involved in any of the logic. By the benchmark you use psycopg is an ORM (it really isn't, it isn't even a query builder).
Don't misunderstand, I'm not saying a query builder is bad, I'm just saying this is not an ORM, and shouldn't be sold as such: it's going to disappoint people looking for ORMs like Django's or Rails's and it's going to turn off people who object to ORMs[0] but would have been interested in a query builder.
Not to mention a good query builder is an excellent basis for a full-fledged ORM.
[0] and there are many people who think ORMs are a terrible idea
> there are many people who think ORMs are a terrible idea
Not sure about terrible but it is not a bright idea to be object centric when schema remains king. Using ORMs makes perfect sense when your domain model is canonically represented by the object tier /and/ you are reusing these (common/core) domain objects to build a multiplicity of applications.
> it just loads query data into objects which is what more or less every query builder does
Query builders build queries (like SQLAlechemy's core library). ORMs know how to marshal object attributes to/from database columns. None of this is to say that one is better than the other.
I don't like ORM in specific cases. Was looking for a query builder and almost ignored this post cause I don't need yet another ORM. Agree with rebranding as a QB, unless project intents to become ORM in the larger sense
Go is multiplatform, and you can easily cross-compile for other OS or other CPU architecture. It produces a single binary then it's easy to deploy. It could be useful.
Go is really easy to learn, in a single day you will have a good understanding of the language itself. It's really something interesting to learn and practice a bit, without needing weeks of work. Even if it doesn't suit you, you had not loss many time.