-
Notifications
You must be signed in to change notification settings - Fork 0
/
features.html
58 lines (49 loc) · 3.2 KB
/
features.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<html>
<head>
<title>Group 4 - Features</title>
<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="styleSheet.css">
<link rel="shortcut icon" type="image/png" href="ruby.png">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
</head>
<body>
<div id="navBarTemplate">
<script>
$(function(){
$("#navBarTemplate").load("navBarTemplate.html");
});
</script>
</div>
<div id="content">
<h2>Features</h2>
<h4>Object-Oriented</h4>
<p>Ruby is an object-oriented language. In fact, everything is an object! Because of this, everything in Ruby has a <code>self</code> pointing at the class associated with that object. This allows for powerful code, as there are no boundries separating code in classes, making abstraction easier.</p>
<h4>Easy to use</h4>
<p>Ruby is also very easy to run. There is no building per se, to run is just a matter of typing:</p>
<li><code>$ ruby <filename> <arg0> <arg1>...</code></li>
<p>Any required code from a <code>require</code> statement will be pulled in automatically.</p>
<h4>Anonymous functions (lambda)</h4>
<p>Ruby also supports lamda expressions, which is a powerful tool when programming.</p>
<h4>Blocks</h4>
<p>In Java, it is necessary to use a <code>try {} catch {}</code> block in order to do anything with IO. In Ruby, this is abstracted away so all the programmer needs to worry about is writing the line of code that deals with IO.</p>
<h4>Adaptable</h4>
<p>Ruby is an open source language and is free to use and modify,
meaning one can tailor Ruby to whatever is needed for the job
at hand. Because of this, Ruby is adaptable and has many
alternate implementations already in place such as:</p>
<ul>
<li>JRuby</li>
<li>Rubinius</li>
<li>MacRuby</li>
<li>mruby</li>
<li>IronRuby</li>
<li>MagLev</li>
<li>Cardinal</li>
</ul>
<h4>Inferred Types</h4>
<p>Ruby doesn't need to be told whether a variable is a boolean, integer, double, etc. With inferred types, Ruby already knows what the variable's type is. <li><code>i = 3.0</code></li> <p><code>i</code> will be assumed to be of type double in this case.</p>
<h4>Implicit Returns</h4>
<p>In Ruby, the last line of a method is considered the return statement unless an explicit return is present. This makes Ruby simplier for the person writing the code.</p>
</div>
</body>
</html>