Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
This is the reason why so many fluid apis exist... no you are definitely not the only one
-
Root825285yTrust me, they exist.
Let me introduce you to javascript chaining and Ruby/Rails, specifically ActiveRecord and RSpec.
ActiveRecord's syntax is like LINQ, except pretty.
ActiveRecord example:
Movies.where(musical: true, chickflick: true, drama: false).where('created_at >= ?', 15.years.ago).where('rating >= ?', 3.5).sort(title: :asc)
World::Population.human.alive.female.single.where(age: 18..28).where('iq >= ?', 140).where(profession: [:dev, :qa, :gamer, :scientist, :engineer]).where(likes_musicals: true, personality: [:intj, :intp, :entp]).where.not(sickly: true).order(iq: :desc)
RSpec example:
describe Object do
let(:new_instance) { FactoryBot.build(:object) }
it "changes the count after saving" do
expect { new_instance.save }.to change { Object.count }.from(0).to(1)
end
end -
Take a look at the kotlin infix: https://kotlinlang.org/docs/...
But it has its limitation, you always need VFV, something like VFFVF or VF or FV does not work.. (v=value, f= function)
Related Rants
Am I the only one who wants to be able to write functions in a human readable way, allowing for parameter in-between the words?
Instead of defining:
const enforceStringEndsWithChar(string: string, char: string) => {...}
I want to define it as:
const enforce(str: string)EndsWith(char: string) => {...}
.
.
.
I'll see myself out.
rant
parameters
be careful what you wish for
random thoughts