4 ms·
It's been over a year since Obvious Architecture came out and over a year before that when Uncle Bob gave his talk on Ruby Midwest. People seem to just now be c
by programminggeek 13y ago
It's been over a year since Obvious Architecture came out and over a year before that when Uncle Bob gave his talk on Ruby Midwest. People seem to just now be catching on.
I've gone really deep down the rabbit hole on these kind of highly decoupled design patterns in Obvious, clean architecture, functional programming, TDD and all of that and I realize now that Ruby is not the optimal language for this style of development and DHH and Rails' purpose is not the same purpose of clean architecture.
I go back and think about the original build a blog in Rails demos, which are great BTW, and I feel like Rails' strength is standing up an application quick and getting stuff done. Yes it can do TDD and clean architecture and all of that fun design stuff, but to be completely honest, it doesn't fit the community or the language as much as it should.
Ruby gives you a lot of amazing tools, but there are a lot of things that make clean architecture way nicer that you end up bolting on to Ruby. Stuff like immutability, type checking, and strong interfaces are not the norm in Rubyland. That is perfectly fine, but by the time you build all those tools, it's hard not to look at a language like Scala or Kotlin and see a lot of those things built in to the language along with a compiler and nice IDE support.
I love Ruby and I use it every day. I live in a Rails app most of the day and I've found ways to make to make the code beautiful, but fundamentally I don't think the Ruby community will ever truly get behind clean architecture. It really flies in the face of the reasons why most people use Ruby in the first place.
- clienthunter 13y agoI think what you say about Rails is true. Rails isn't a framework, it's a lifestyle. I also started to question whether Ruby's type system was just too loose for serious work and was yearning for something as pleasant as Ruby but with at least some type safety. Then yesterday I read this relatively old post https://www.ruby-forum.com/topic/217617 https://www.ruby-forum.com/topic/217617 about adding static typing to Ruby. There's a lot of recognisable names in the thread, but the posts from Eleanor McHugh nearer the bottom really helped me understand the power and utility behind the apparent simplicity.
- programminggeek 13y agoI would love a compiled, statically typed Ruby, but I don't think the Ruby world wants it. I think Ruby is a fine tool in its current state. I think there is a need for a different language that makes clean architecture natural, well accepted, normal thing. Ruby is great, but trying to change the community and language doesn't seem to be the right approach.
- infraruby 13y ago> I would love a compiled, statically typed Ruby http://infraruby.com/ http://infraruby.com/ is a compiled, statically typed subset of Ruby, compatible with Ruby interpreters.
- sethboyles 13y agoLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
- clienthunter 13y agoIs this actually type safe, or type safe up until you include an untyped gem and the whole thing becomes indeterminate? Does the typing actually improve performance over straight jRuby? Can it handle method_missing and *_eval? Also why is it closed source? edit: sorry I didn't mean to sound aggressive. please interpret the stream of questions as extreme curiosity.
- infraruby 13y ago> Is this actually type safe The type system is roughly the same as in Java, and, as in Java, there are ways around the type system. > or type safe up until you include an untyped gem and the whole thing becomes indeterminate? The compiler requires type annotations; you can't include an untyped gem! InfraRuby syntax is compatible with Ruby interpreters, so you can still use your code while you write type annotations for it. > Does the typing actually improve performance over straight jRuby? Yes. The compiler is written in Ruby, and uses JRuby to bootstrap. The performance of the compiled compiler compiling the compiler is about 7x JRuby. > Can it handle method_missing and *_eval? No. The subset of Ruby supported by InfraRuby excludes metaprogramming and reflection. > Also why is it closed source? Because 1. give away your work 2. ??? 3. profit! is not compelling :-p
- wx196 13y agoSome thoughts about hard to learn Scala: http://www.javacodegeeks.com/2011/09/scala-use-is-less-good-than-java-use.html http://www.javacodegeeks.com/2011/09/scala-use-is-less-good-...
- programminggeek 13y agoI've done Scala in the past and I think I'd be able to handle it better now. Honestly though, there is such a small footprint of the language that I would even care to use that I'm not sure it's worth learning. I'd probably stick to the immutable value objects, functional constructs like ruby's equivalent to map, select, each, etc., and use traits to enforce contracts on jack/plug objects. A lot of the other things in Scala don't appeal to me. This is one reason Kotlin is looking more interesting from where I sit. It has the features I want, IDE support, and a decent syntax. It is entirely possible that I'll check out Scala again and fall in love with the language. Who knows.