All Questions
2 questions
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){
...
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 ...