Y a ma tête qui chauffe
Barbarie culturelle 2
#culture #art #politique #arguments #IA #barbarie #discours #démocratie #contre-discours
Y a ma tête qui chauffe
Barbarie culturelle 2
#culture #art #politique #arguments #IA #barbarie #discours #démocratie #contre-discours
Following up on my previous post https://mastodon.social/@yegorov/116594842832339445 (where I showed how to set default values in Ruby methods), it turns out you can write not just a single expression on the right side, but an entire block of code inside a begin-end construct.
#Ruby #Method #Default #Arguments #KeywordArguments #BeginEnd
Weakness
Strong and bitter words indicate a weak cause.
~ Victor Hugoslip:4a848.
#Arguments #Quotes #ReasonAndRationality #VictorHugoUnderstanding
I have found you an argument; But I am not obliged to find you an understanding.
~ Samuel Johnsonslip:4a853.
#Arguments #Quotes #SamuelJohnsonIf you work with Ruby, you should know that arguments in methods can be set to a default value, for example:
```
def perform(arg: "d")
# .
end
```
But did you know that you can use instance variables as default values, like this:
```
class MyCls
def initialize(arg); @arg = arg; end
def perform(arg = @arg); end
end
```
Or other arguments of this method:
```
module MyMod
def self.perform(a = nil, arg: a); end
end
```
#Ruby #Method #Default #Arguments #KeywordArguments #InstanceVariable