SlideShare a Scribd company logo
1 of 14
‫زبان برنامه نویسی جاوا (اندروید)و‬
‫لیسپ‬
‫استاد : جناب آقای دکتر معطر‬
‫فهرست‬
‫•‬
‫•‬
‫•‬
‫•‬
‫•‬
‫•‬
‫•‬
‫•‬

‫مقدمه‬
‫تعریف متغییر ها‬
‫معیار های عمومی نحو زبان (جاوا، لیسپ)‬
‫تعریف متغییر های خاص‬
‫قابلیت تغییر نوع متغییر در زبان ها‬
‫انقیاد ها‬
‫حلقه ها‬
‫کاربرد های لیسپ و جاوا‬
‫مقدمه‬

‫هر دو زبان جاوا و لیسپ مفسری هستند، ولی جاوا نیاز به یک‬
‫ماشین مجازی برای اجرای کد های نوشته شده دارد در حالی‬
‫که لیسپ در نرم افزار مخصوص خود نوشته و اجرا می شود.‬
‫تعریف متغییر ها‬
‫در لیسپ‬

(let ((a 10 )( b 10 )(c
“test”))
…..//code
)
(setf x (* 3 2))
(setf abc 17)

‫در جاوا‬

Int a;
String m;
Public Static String a =
“10”; //‫ضمنی‬
Boolean a = true;
Final float u = 10;
Integer a = x * 10;
‫نکته‬

‫لیسپ یک زبان کامال تابعی است ، یعنی برای نوشتم کد های‬
‫این زبان نیاز به نوشتن مجموعه ای از توابع است ولی جاوا این‬
‫امکان را به شما می دهد که از تابع یا دستورات معمولی و یا هر‬
‫دو استفاده کنید .‬
‫معیار های عمومی نحو زبان‬
‫کد نویسی در جاوا‬

‫‪‬قابلیت خوانایی پایین‬
‫‪‬قابلیت نوشتن باال‬

‫کد نویسی در لیسپ‬

‫‪‬قابلیت خوانایی پایین‬
‫‪‬قابلیت نوشتن پایین‬
‫معیار های عمومی نحو زبان‬
‫کد نویسی در جاوا‬

‫کد نویسی در لیسپ‬

‫‪ ‬سهولت بازرسی باال‬
‫(خطا یابی راحت است)‬

‫‪‬سهولت بازرسی‬
‫پایین(سخت)‬

‫جاوا با استفاده از سه نوع‬
‫سیستم خطا یابی کمک به‬
‫اجرای هرچه بهتر کد ها می کند‬
‫.‬
‫1 در زمان نوشتن‬
‫2 قابلیت دیباگ کردن با پالگین‬
‫مخصوص‬
‫3 قابلیت اجرای خط به خط کد ها‬

‫‪‬در لیسپ در زمانی که خطا‬
‫رخ می دهد مشخص نیست‬
‫ایراد کار از کجا می باشد و‬
‫باید تمام خطوط باز بینی‬
‫شود .‬
‫معیار های عمومی نحو زبان‬
‫کد نویسی در جاوا‬
‫‪ ‬سهولت ترجمه پایین (ترجمه این‬
‫زبان بسیار زمان بر و هزینه بر‬
‫است )‬

‫اگر در جاوا تغییری بخواهیم انجام‬
‫دهید ، کد ها باید از اول دوباره اجرا‬
‫شوند و به دلیل استفاده از ماشن‬
‫مجازی (شبیه ساز گوشی های‬
‫هوشمند ) این کار زمان زیادی را‬
‫صرف خواهد کرد‬
‫‪ ‬عدم وجود ابهام در برنامه نویسی‬
‫به دلیل وجود کلمات رزرو شده‬

‫کد نویسی در لیسپ‬

‫‪‬سهولت ترجمه باال(ترجمه‬
‫این زبان ساده است)‬
‫به دلیل اینکه لیسپ از‬
‫ساختار ساده ای استفاده‬
‫می کند ترجمه به سرعت‬
‫صورت گرفته و برنامه ها زود تر‬
‫اجرا می شوند‬
‫تعریف متغییر های خاص‬
‫جاوا‬

‫لیسپ‬

‫‪‬در جاوا این امکان وجود دارد‬
‫که شما متغییری بدون‬
‫مقدار اولیه را تعریف کنید‬

‫‪‬در لیسپ متغییر ها بستگی‬
‫به موقعیت آنها مقدار اولیه‬
‫نیاز دارند‬
‫(‬
‫‪let ((a 10 )( b 10 )(c‬‬
‫))”‪“test‬‬
‫(‬

‫;‪String temp = null‬‬
‫;‪Integer temp10 = null‬‬
‫;‪Boolean temp10 = null‬‬
‫قابلیت تغییر نوع متغییر ها‬
‫لیسپ‬

‫در لیسپ این امکان وجود‬
‫ندارد‬

‫جاوا‬
String temp11 = "1";
Integer temp10 =
Integer.valueOf(temp11);
Integer temp10 = 10;
String temp12 =
temp10.toString();
String temp11 =
String.valueOf(temp10);
‫انقیاد ها‬
‫جاوا‬

‫لیسپ‬

‫انقیاد ها در زبان جاوا هم در‬
‫زمان کد نویسی و هم در زمان‬
‫اجرا صورت می گیرد .‬

‫‪‬در لیسپ تمامی انقیاد ها‬
‫در زمان اجرا صورت می گیرد‬
‫حلقه ها‬
‫لیسپ‬
(dolist (x '(a b c d e)) (print
x))
ABCDE
---------------------------(dotimes (x 4 "yo") (print
"hello"))
"hello“
"hello“
"hello“
"hello"
"yo"

‫جاوا‬
for(int a = 10; a<5 && a>3;
a++){
//code
}
-----------------------------do{
//code
}while(a!=10);
---------------------------------
‫کاربرد ها‬

‫لیسپ‬

‫جاوا‬
‫کاربرد ها‬

‫باتشکر‬

www.alighaeni.ir

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

مقایسه دو زبان جاوا و لیسپ درس پی ال

  • 1. ‫زبان برنامه نویسی جاوا (اندروید)و‬ ‫لیسپ‬ ‫استاد : جناب آقای دکتر معطر‬
  • 2. ‫فهرست‬ ‫•‬ ‫•‬ ‫•‬ ‫•‬ ‫•‬ ‫•‬ ‫•‬ ‫•‬ ‫مقدمه‬ ‫تعریف متغییر ها‬ ‫معیار های عمومی نحو زبان (جاوا، لیسپ)‬ ‫تعریف متغییر های خاص‬ ‫قابلیت تغییر نوع متغییر در زبان ها‬ ‫انقیاد ها‬ ‫حلقه ها‬ ‫کاربرد های لیسپ و جاوا‬
  • 3. ‫مقدمه‬ ‫هر دو زبان جاوا و لیسپ مفسری هستند، ولی جاوا نیاز به یک‬ ‫ماشین مجازی برای اجرای کد های نوشته شده دارد در حالی‬ ‫که لیسپ در نرم افزار مخصوص خود نوشته و اجرا می شود.‬
  • 4. ‫تعریف متغییر ها‬ ‫در لیسپ‬ (let ((a 10 )( b 10 )(c “test”)) …..//code ) (setf x (* 3 2)) (setf abc 17) ‫در جاوا‬ Int a; String m; Public Static String a = “10”; //‫ضمنی‬ Boolean a = true; Final float u = 10; Integer a = x * 10;
  • 5. ‫نکته‬ ‫لیسپ یک زبان کامال تابعی است ، یعنی برای نوشتم کد های‬ ‫این زبان نیاز به نوشتن مجموعه ای از توابع است ولی جاوا این‬ ‫امکان را به شما می دهد که از تابع یا دستورات معمولی و یا هر‬ ‫دو استفاده کنید .‬
  • 6. ‫معیار های عمومی نحو زبان‬ ‫کد نویسی در جاوا‬ ‫‪‬قابلیت خوانایی پایین‬ ‫‪‬قابلیت نوشتن باال‬ ‫کد نویسی در لیسپ‬ ‫‪‬قابلیت خوانایی پایین‬ ‫‪‬قابلیت نوشتن پایین‬
  • 7. ‫معیار های عمومی نحو زبان‬ ‫کد نویسی در جاوا‬ ‫کد نویسی در لیسپ‬ ‫‪ ‬سهولت بازرسی باال‬ ‫(خطا یابی راحت است)‬ ‫‪‬سهولت بازرسی‬ ‫پایین(سخت)‬ ‫جاوا با استفاده از سه نوع‬ ‫سیستم خطا یابی کمک به‬ ‫اجرای هرچه بهتر کد ها می کند‬ ‫.‬ ‫1 در زمان نوشتن‬ ‫2 قابلیت دیباگ کردن با پالگین‬ ‫مخصوص‬ ‫3 قابلیت اجرای خط به خط کد ها‬ ‫‪‬در لیسپ در زمانی که خطا‬ ‫رخ می دهد مشخص نیست‬ ‫ایراد کار از کجا می باشد و‬ ‫باید تمام خطوط باز بینی‬ ‫شود .‬
  • 8. ‫معیار های عمومی نحو زبان‬ ‫کد نویسی در جاوا‬ ‫‪ ‬سهولت ترجمه پایین (ترجمه این‬ ‫زبان بسیار زمان بر و هزینه بر‬ ‫است )‬ ‫اگر در جاوا تغییری بخواهیم انجام‬ ‫دهید ، کد ها باید از اول دوباره اجرا‬ ‫شوند و به دلیل استفاده از ماشن‬ ‫مجازی (شبیه ساز گوشی های‬ ‫هوشمند ) این کار زمان زیادی را‬ ‫صرف خواهد کرد‬ ‫‪ ‬عدم وجود ابهام در برنامه نویسی‬ ‫به دلیل وجود کلمات رزرو شده‬ ‫کد نویسی در لیسپ‬ ‫‪‬سهولت ترجمه باال(ترجمه‬ ‫این زبان ساده است)‬ ‫به دلیل اینکه لیسپ از‬ ‫ساختار ساده ای استفاده‬ ‫می کند ترجمه به سرعت‬ ‫صورت گرفته و برنامه ها زود تر‬ ‫اجرا می شوند‬
  • 9. ‫تعریف متغییر های خاص‬ ‫جاوا‬ ‫لیسپ‬ ‫‪‬در جاوا این امکان وجود دارد‬ ‫که شما متغییری بدون‬ ‫مقدار اولیه را تعریف کنید‬ ‫‪‬در لیسپ متغییر ها بستگی‬ ‫به موقعیت آنها مقدار اولیه‬ ‫نیاز دارند‬ ‫(‬ ‫‪let ((a 10 )( b 10 )(c‬‬ ‫))”‪“test‬‬ ‫(‬ ‫;‪String temp = null‬‬ ‫;‪Integer temp10 = null‬‬ ‫;‪Boolean temp10 = null‬‬
  • 10. ‫قابلیت تغییر نوع متغییر ها‬ ‫لیسپ‬ ‫در لیسپ این امکان وجود‬ ‫ندارد‬ ‫جاوا‬ String temp11 = "1"; Integer temp10 = Integer.valueOf(temp11); Integer temp10 = 10; String temp12 = temp10.toString(); String temp11 = String.valueOf(temp10);
  • 11. ‫انقیاد ها‬ ‫جاوا‬ ‫لیسپ‬ ‫انقیاد ها در زبان جاوا هم در‬ ‫زمان کد نویسی و هم در زمان‬ ‫اجرا صورت می گیرد .‬ ‫‪‬در لیسپ تمامی انقیاد ها‬ ‫در زمان اجرا صورت می گیرد‬
  • 12. ‫حلقه ها‬ ‫لیسپ‬ (dolist (x '(a b c d e)) (print x)) ABCDE ---------------------------(dotimes (x 4 "yo") (print "hello")) "hello“ "hello“ "hello“ "hello" "yo" ‫جاوا‬ for(int a = 10; a<5 && a>3; a++){ //code } -----------------------------do{ //code }while(a!=10); ---------------------------------