<FromGitter>
<Blacksmoke16> @drujensen @robacarp I took another stab at the annotation based approach, however i'm not sure if it is something that would be worth it, thoughts?
<FromGitter>
<Blacksmoke16> downsides it would require a good chunk of refactoring and some pretty significant changes in usage. For example on the prototype i have, i removed validations for now (inheritance works now tho), have to explicitly declare table and primary keys, with PK key being nilable
<FromGitter>
<Blacksmoke16> There might be solutions to some/all of the issues but for now thats what im running with...
<FromGitter>
<drujensen> I really dislike the annotations myself. I think they look ugly and I’ve always avoided them in Java/Hibernate implementations myself.
<FromGitter>
<drujensen> I may be in the minority though
<FromGitter>
<drujensen> @ro
snsei has quit [Remote host closed the connection]
snsei has joined #amber
snsei has quit [Remote host closed the connection]
<FromGitter>
<robacarp> I’m with you, Dru. There is a lot of potential, but I’d avoid it wherever possible.
<FromGitter>
<Blacksmoke16> fair enough
<FromGitter>
<Blacksmoke16> guess im the sole supporter. Just seems that it'll have to be done eventually. based on what i keep reading it sounds like the mutable constants and such we're doing isnt real liked and would in future possibly be replaced by annotations
<FromGitter>
<Blacksmoke16> plus the amount of boilerplate and stuff i was able to remove with this is great
<FromGitter>
<Blacksmoke16> im undecided on how to handle some of this still, is still a prototype/idea stage so just seeing if everything is doable atm
<FromGitter>
<Blacksmoke16> i.e. could have a `@[Granite::Column(primary: true)]` instead
<FromGitter>
<Blacksmoke16> but granted i dont think its going to happen tomorrow so :shrug:
<FromGitter>
<Blacksmoke16> ill prob work on it for the fun of it and will at least have something if it ever comes to it
<FromGitter>
<drujensen> that sucks
<FromGitter>
<drujensen> not you, i mean that they are recommending annotations
<FromGitter>
<drujensen> i find them an eyesore myself
<FromGitter>
<drujensen> hard to read and distracting
<FromGitter>
<Blacksmoke16> to each their own i guess, im a big fan. the things they allow you to do and makes it pretty clear what they are doing is super nice vs how you would have to do it otherwise
<FromGitter>
<Blacksmoke16> like macing a macro to build the property for you etc
<FromGitter>
<drujensen> no, i get that they are powerful. used them all the time in Java
<FromGitter>
<Blacksmoke16> so like any annotations people want to apply, e.g. from my validation/serialization lib etc just works
<FromGitter>
<drujensen> just not asthetically pleasing
<FromGitter>
<drujensen> you lose the eye pleasing code that ruby provided
<FromGitter>
<Blacksmoke16> did ruby have annotations?
<FromGitter>
<drujensen> one of the big reasons to choose Crystal imo
<FromGitter>
<drujensen> not that i’m aware of
<FromGitter>
<drujensen> never seen it in any code i’ve ever worked on for the last 10 years
<FromGitter>
<Blacksmoke16> am wondering how you would do this kind of stuff in ruby
<FromGitter>
<Blacksmoke16> or do they have their own system in place to handle this kind of stuff
<FromGitter>
<drujensen> ruby is interpreted so you can pretty much do anything
<FromGitter>
<drujensen> method missing, etc
<FromGitter>
<drujensen> meta programming
<FromGitter>
<drujensen> macros provide a similar power
<FromGitter>
<drujensen> oh well, I agree its powerful and will definitely clean up stuff
<FromGitter>
<drujensen> but it will get fairly ugly once everyone decides to use them
<FromGitter>
<drujensen> and abuse them. ::=/
<FromGitter>
<Blacksmoke16> just like with macros ;)
<FromGitter>
<drujensen> yup
<FromGitter>
<drujensen> lol
<FromGitter>
<drujensen> gotta go
<FromGitter>
<drujensen> ttyl
<FromGitter>
<Blacksmoke16> o/
<FromGitter>
<robacarp> there are non-annotation ways of solving the problem of mutable constants though
<FromGitter>
<robacarp> I believe the jennifer orm does similar
<FromGitter>
<Blacksmoke16> true true
<FromGitter>
<robacarp> at the end of the "columns" macro processing, it renders the fields and such. I think granite used to do it this way as well, actually, but switched to the finished macro at some point in history.
<FromGitter>
<Blacksmoke16> where in reality the macros just add the properties and such to the class?
<FromGitter>
<robacarp> right now?
<FromGitter>
<Blacksmoke16> in that example
<FromGitter>
<Blacksmoke16> but yea, thats what the `field` macro does atm
<FromGitter>
<robacarp> I think the `field` macro would add to a macro-space variable, which isn't a "constant", and is then iterated at the end of the `columns` macroblock
<FromGitter>
<robacarp> reading back, my objection to annotations is pretty much the same as what Dru said: they're kind of messy looking. Maybe the functionality they provide is great, and if it's the best way to go then :shrug:
<FromGitter>
<robacarp> ¯\_(ツ)_/¯
snsei has joined #amber
<FromGitter>
<Blacksmoke16> too early to tell for now
<FromGitter>
<Blacksmoke16> not something that has to be done until some more concrete info comes along
<FromGitter>
<robacarp> yeah, I worry that the concrete info isn't going to come along until way too late :<
<FromGitter>
<Blacksmoke16> :P
<FromGitter>
<Blacksmoke16> see how it goes i guess
snsei has quit [Remote host closed the connection]
snsei has joined #amber
snsei has quit [Remote host closed the connection]
snsei has joined #amber
<FromGitter>
<drujensen> I wonder if they can make the annotations look more rubyish instead of `@[]`
<FromGitter>
<drujensen> like a comment or something
snsei has quit [Remote host closed the connection]