Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
1 answer
395 views

Does LSP also make sense for dynamic typed language like Ruby? [closed]

Consider the classic example in Java // Violation of Likov's Substitution Principle class Rectangle { protected int m_width; protected int m_height; public void setWidth(int width){ ...
mko's user avatar
  • 22k
19 votes
8 answers
4k views

Ruby and duck typing: design by contract impossible?

Method signature in Java: public List<String> getFilesIn(List<File> directories) similar one in ruby def get_files_in(directories) In the case of Java, the type system gives me ...
davetron5000's user avatar
  • 24.8k