E-Siber.com
teknoloji haberinin
değil, bilgisinin
peşinde...
   
Sitede şu an 1546 yazı bulunmaktadır.

Son Yorumlar

Programlama Dilleri Referans Sayfaları

Hyperpolyglot, PHP, Perl ve Python gibi kodlama dilleri, Tcl, Lua, ve JavaScript gibi embeddable dilleri, Bash, Zsh ve AppleScript gibi shell dilleri, C, C++ ve Java gibi C stili dilleri, Pascal, Ada ve PL/SQL gibi Pascal stili dilleri, Mathematica ve Maxima gibi bilgisayar cebir yazılımları ve Matlab ve R gibi sayısal analiz yazılımlarını ortak görevler için sözdizimleri ve betiklerini karşılıklı olarak gösteren çok yararlı bir programlama referans kaynağıdır.

 

Site tüm programlama dillerinin yani birbirlerini türevleri olan ve benzer sözdizimlerine sahip olan dilleri ortak bir tabloda bir araya getirip, onların değişken, operatör, diziler, fonksiyonlar, kütüphaneler, nesneler, tarih, web, atama ve öbekleme gibi farklı derleme ve yorumlamalarını karşılaştırmalı olarak göstererek çok faydalı bir iş yapıyor. Böylelikle aynı semantikte başka bir türev dilini öğrenmek isteyenler için birebir referans olma özelliğini gösteriyor.

 

Örneğin kodlama dillerinin karşılaştırılması tablosunun bir kısmını altta inceleyebilirsiniz:

  php (1995) perl (1987) python (1991) ruby (1995)
versions used
 
5.3    5.10; 5.12; 5.14 2.6; 2.7; 3.2 1.8; 1.9
show version
 
$ php --version $ perl --version $ python -V $ ruby --version
interpreter
 
$ php -f foo.php $ perl foo.pl $ python foo.py $ ruby foo.rb
repl
 
$ php -a $ perl -de 0 $ python $ irb
statement separator
 
; ; newline or ;

newlines not separators inside (), [], {}, triple quote literals, or when preceded by backslash:
newline or ;

newlines not separators inside (), [], {}, ``, '', "", or when preceded by a binary operator or backslash:
block delimiters
 
{} {} offside rule {}
do end
assignment
 
$v = 1; $v = 1; # does not return a value:
v = 1
v = 1
parallel assignment
 
list($x, $y, $z) = array(1 ,2, 3);
# 3 is ignored:
list($x, $y) = array(1, 2, 3);
# $z set to NULL:
list($x, $y, $z) = array(1, 2);
($x, $y, $z) = (1, 2, 3);
# 3 is ignored:
($x, $y) = (1, 2, 3);
# $z set to undef:
($x, $y, $z) = (1, 2);
x, y, z = 1, 2, 3
# raises ValueError:
x, y = 1, 2, 3
# raises ValueError:
x, y, z = 1, 2
x, y, z = 1, 2, 3
# 3 is ignored:
x, y = 1, 2, 3
# z set to nil:
x, y, z = 1, 2
swap
 
list($x, $y) = array($y, $x); ($x, $y) = ($y, $x); x, y = y, x x, y = y, x
compound assignment operators: arithmetic, string, logical, bit += -= *= none /= %= **=
.= none
&= |= none
<<= >>= &= |= ^=
+= -= *= none /= %= **=
.= x=
&&= ||= ^=
<<= >>= &= |= ^=
# do not return values:
+= -= *= /= //= %= **=
+= *=
&= |= ^=
<<= >>= &= |= ^=
+= -= *= /= none %= **=
+= *=
&&= ||= ^=
<<= >>= &= |= ^=
increment and decrement
 
$x = 1;
++$x;
--$x;
$x = 1;
++$x;
--$x;
none x = 1
# x not mutated:
x.succ
x.pred
local variable declarations
 
# in function body:
$v = NULL;
$a = array();
$d = array();
$x = 1;
list($y, $z) = array(2, 3);
my $v;
my (@a, %d);
my $x = 1;
my ($y, $z) = (2, 3);
# in function body:
v = None
a, d = [], {}
x = 1
y, z = 2, 3
v = nil
a, d = [], {}
x = 1
y, z = 2, 3
regions which define local scope top leve   l:
  function or method body

nestable (with use clause):
  anonymous function body
top level:
  file

nestable:
  function body
  anonymous function body
  anonymous block
nestable (read only):
  function or method body
top level:
  file
  class block
  module block
  method body

nestable:
  anonymous function block
  anonymous block
global variable list($g1, $g2) = array(7, 8);
function swap_globals() {
  global $g1, $g2;
  list($g1, $g2) = array($g2, $g1);
}
our ($g1, $g2) = (7, 8);
sub swap_globals() {
  ($g1, $g2) = ($g2, $g1);
}
g1, g2 = 7, 8
def swap_globals():
  global g1, g2
  g1, g2 = g2, g1
$g1, $g2 = 7, 8
def swap_globals()
  $g1, $g2 = $g2, $g1
end
constant declaration
 
define("PI", 3.14); use constant PI => 3.14; # uppercase identifiers
# constant by convention

PI = 3.14
# warning if capitalized
# identifier is reassigned

PI = 3.14
to-end-of-line comment
 
// comment
# comment
# comment # comment # comment
comment out multiple lines
 
/* comment line
another line */
=for
comment line
another line
=cut
use triple quote string literal:
'''comment line
another line'''
=begin
comment line
another line
=end
null
 
NULL # case insensitive undef None nil
null test
 
is_null($v)
! isset($v)
! defined $v v == None
v is None
v == nil
v.nil?
undefined variable access
 
NULL error under use strict; otherwise undef raises NameError raises NameError
undefined test
 
same as null test; no distinction between undefined variables and variables set to NULL same as null test; no distinction between undefined variables and variables set to undef not_defined = False
try: v
except NameError: not_defined = True
! defined?(v)

kodlama dilleri karşılaştırmasının devamına bu adresten bakabilirsiniz. Tüm programlama dilleri için ise aşağıdaki adresi ziyaret edebilirsiniz.

 

Adres: http://hyperpolyglot.org


· · · · · · · · · · · · · · · · · · · · · · · · · · · ·
Yazan: | 18.08.2011 | 766 kez okundu.

 


WEB SİTELERİ

Yukarı Çık

© 2012 E-SİBER BİLGİ-İLETİŞİM TEKNOLOJİLERİ | Hakkımızda
Bilişim | İnternet | Bilgi Güvenliği | Sosyal Medya | Teknoloji | M. Mekin Pesen
Adresler: E-Siber.com | E-Siber.net | ESiber.com | RSS | Facebook | Twitter | Abone Olun
IP: 38.107.179.220 | Süre: 0.699 saniye. | İletişim | Reklam Verin | Politikalar | İstatistikler