Что нового

AutoIt. Что учить после?

Andrei7

Новичок
Сообщения
72
Репутация
3
1. C++
2. Java
PHP, Python
- где то на одном уровне :scratch:
Вообще смысл твоего поста? сейчас будут спорить, что тот легче, тот тяжелее ;D
 
Автор
T

_ToBe_

Осваивающий
Сообщения
142
Репутация
35
Andrei7, мне бы это помогло определиться что учить и куда двигаться. Думаю и многим бы тоже помогло...

А почему у тебя С++ идёт на первом месте? Он разве самый лёгкий чтоль? :D
 

Medic84

Омега
Команда форума
Администратор
Сообщения
1,590
Репутация
341
_ToBe_ [?]
Вот не надо приравнивать C# к C++. Это абсолютно разные вещи.
Вот если бы Вы сказали что Java похож на C#, я бы согласился.
А PHP похож на C++

Проэтому я расставлю силы от легкого к сложному
1. C#
2. Java
3. PHP
4. C++


Примеры языков:
Java:
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
 
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface Annotation {
 
    public boolean value() default false;
 
}
 
@Annotation(value=true)
public class TestClass {
 
}
 
public class Main {
 
    public static void main(String[] args) {
        TestClass testClass = new TestClass();
 
        Annotation annotation = testClass.getClass().getAnnotation(Annotation.class);
        if (annotation != null) {
            System.out.printf("value: %s \n", annotation.value());
        }
    }
}
C#:
using System;
 
namespace Example
{
    class Program
    {
        static void Main()
        {
            Console.WriteLine("Hello World!"); // Вывод заданного текста в консоль
            Console.ReadKey(); // Ожидание нажатия клавиши пользователем
        }
    }
}
PHP:
class C1 extends C2 implements I1, I2
{
  private $a;
  protected $b;
 
  function __construct($a, $b)
  {
    parent::__construct($a, $b);
    $this->a = $a;
    $this->b = $b;
  }
 
  public function plus()
  {
    return $this->a + $this->b;
  }
/* ...............  */
}
 
$d = new C1(1, 2);
echo $d->plus(); // 3
C++:
#include <iostream>
#include <numeric>
#include <boost/iterator/counting_iterator.hpp>
#include <boost/iterator/transform_iterator.hpp>
 
int odd(int i)
{
  return 2 * i + 1;
}
 
int square(int i)
{
  return i * i;
}
 
typedef boost::counting_iterator <int> counter;
typedef boost::transform_iterator <int (*)(int), counter> transformer;
 
transformer odds(int n)
{
  return transformer(counter(n), odd);
}
 
transformer squares(int n)
{
  return transformer(counter(n), square);
}
 
int main()
{
  using namespace std;
 
  cout << "Enter vector length: ";
  int n; cin >> n;
 
  cout << inner_product( odds(0), odds(n), squares(0), 0 ) << endl;
}

P.S. С питоном вообще не сталкивался, простите :smile:
 
Верх