Answer the question
In order to leave comments, you need to log in
What are alternatives to python for console applications?
Good evening.
Immediately I apologize for the stupid question, I myself do not like such people. But I'm confused.
I need a language for writing all kinds of scripts for personal needs, both very simple and quite false. No gui, just a console application. It will run on Linux, so cross-platform is not critical. If possible, I will start writing sites on it instead of php.
What I would like from a language:
- normal OOP
- multi-threading
- the ability to use it for the web (although not necessary)
- strong typing is highly desirable
What I have already looked at:
- rubyWhat I liked most about this language was the syntax and complete oops. There are also powerful web frameworks. But in terms of NOT the web, it is not very good (judging by the discussions pointed out by Google).
- python Excellent language. Available on almost all Linuxes. A lot of lib. There are also frameworks for the web. But oops it's incomplete. At least I did not find interfaces, abstract classes and private methods out of the box.
- perl I know little about this language. His weak demand repels him. I'm not saying that it is not needed at all, but if compared with previous languages, then this is obvious. Google also points out that it is not all right with multithreading.
- golangInteresting, but without the classic oop. Did not like. Plus, I did not find STABLE and established frameworks for it. Apparently still young.
That's all toil. Like python is a good fit, but stops it under OOP.
Actually, two questions are of interest:
- Is it possible to implement a full-fledged OOP in python?
- What are the alternatives?
I would be grateful for any thoughts.
Answer the question
In order to leave comments, you need to log in
python
www.stackoverflow.com/a/13646263/1346222
from abc import ABCMeta, abstractmethod
class Abstract(object):
__metaclass__ = ABCMeta
@abstractmethod
def foo(self):
pass
Abstract()
>>> TypeError: Can not instantiate abstract class Abstract with abstract methods foo
class B(Abstract):
pass
B()
>>> TypeError: Can not instantiate abstract class B with abstract methods foo
I'll just leave this (David Copeland - Build awesome command-line applications in Ruby 2) here.
I myself am not a rubyist, I write everything in Scala and C #, but it seems to me that one cannot help but recall the existence of a whole book that answers your question.
python. interfaces and abstract classes are rolled out by libraries, and private methods are out of the box, just not the ones you are used to in other languages.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question